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

Refactor existing e2e tests to take traces as inputs #875

Closed
Tracked by #2427
p-offtermatt opened this issue Apr 24, 2023 · 3 comments · Fixed by #878
Closed
Tracked by #2427

Refactor existing e2e tests to take traces as inputs #875

p-offtermatt opened this issue Apr 24, 2023 · 3 comments · Fixed by #878
Assignees
Labels
scope: testing Code review, testing, making sure the code is following the specification. type: refactoring Code refactoring

Comments

@p-offtermatt
Copy link
Contributor

p-offtermatt commented Apr 24, 2023

We want to get rid of the hardcoded test cases for e2e tests in our Go code, but instead take test cases from files, which will make our tests more reusable.

Potential formats for traces

Closing Criterion
The e2e tests read the action/state sequences from a file in some standard format.

@p-offtermatt p-offtermatt self-assigned this Apr 24, 2023
@p-offtermatt p-offtermatt transferred this issue from cosmos/gaia Apr 24, 2023
@p-offtermatt p-offtermatt added scope: testing Code review, testing, making sure the code is following the specification. type: refactoring Code refactoring labels Apr 24, 2023
@p-offtermatt
Copy link
Contributor Author

p-offtermatt commented Apr 24, 2023

For now, I will implement a parser for the ITF format.
Some aspects need special care:

  • The ITF format has no standard way to specify that only part of the state is relevant - it usually expects the full state after each action. This information could be added in the meta field for each step, or we can implicitly only list the state we care about

@p-offtermatt
Copy link
Contributor Author

p-offtermatt commented Apr 24, 2023

Going for the ITF parser first seemed unhelpful, since it seemed hard to get correct inputs to test the implementation on, so for now, I decided on implementing a simple JSON writer/parser that unmarshals/marshals the classes that already exist in the code.

Other writers can follow later as separate issues.

@p-offtermatt p-offtermatt linked a pull request Apr 24, 2023 that will close this issue
14 tasks
@p-offtermatt
Copy link
Contributor Author

Issue was not closed by PR merge for some reason, so closing manually.

@p-offtermatt p-offtermatt linked a pull request Aug 25, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: testing Code review, testing, making sure the code is following the specification. type: refactoring Code refactoring
Projects
Status: ✅ Done
1 participant