Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement E2E tests for all supported types in the SDK #232

Open
iqdecay opened this issue Apr 27, 2022 · 2 comments
Open

feat: implement E2E tests for all supported types in the SDK #232

iqdecay opened this issue Apr 27, 2022 · 2 comments
Labels
enhancement New feature or request tech-debt Improves code quality or safety testing

Comments

@iqdecay
Copy link
Contributor

iqdecay commented Apr 27, 2022

We currently don't test all types in the SDK, so when something doesn't work, we don't necessarily know where the issue resides. For instance we didn't know Enum didn't work until recently.
We should have a big Sway contract that uses all types and just test the whole contract as part of the harness.

@iqdecay iqdecay added enhancement New feature or request tech-debt Improves code quality or safety labels Apr 27, 2022
@iqdecay iqdecay moved this to Todo in Fuel Network Apr 27, 2022
@hal3e
Copy link
Contributor

hal3e commented Jun 17, 2022

Currently, we have tests and test_project that cover a lot of cases. For example, we have several test_projects for enums: enum_as_input, enum_encoding, enum_inside_struct, nested_enums, struct_inside_enum.
How would we approach this issue? Do we make a new big test_project with all the types and repeat some tests?
How do we deal with the variations (struct in enum, tuple in enum, enum in tuple etc)?

I would propose that we leave the current tests as they are and add the ones that we think are missing.
I would also propose that we refactor the current test_projects. I would propose we use one for every custom type.
For example, put everything related to enums in one test_project but separate the different aspects with functions inside the contract and tests in the harness.

@iqdecay
Copy link
Contributor Author

iqdecay commented Jun 17, 2022

Yes this issue should be part of a broader discussion around testing in the SDK.

@hal3e hal3e assigned hal3e and unassigned hal3e Aug 2, 2022
@digorithm digorithm removed this from Fuel Network Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tech-debt Improves code quality or safety testing
Projects
None yet
Development

No branches or pull requests

3 participants