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

VM integration testing #1242

Open
iFrostizz opened this issue Aug 2, 2024 · 0 comments · May be fixed by #1250
Open

VM integration testing #1242

iFrostizz opened this issue Aug 2, 2024 · 0 comments · May be fixed by #1250
Assignees

Comments

@iFrostizz
Copy link
Contributor

iFrostizz commented Aug 2, 2024

A specifically written vm integration testing framework would be useful to reduce the boilerplate when writing tests targeting the vm only. This would have several benefits over e2e testing such as speed and less boilerplate, but also complexity. It would be used in a different context than action parametrized testing because it would let the implementer have more control over the vm, send transactions and observe their intended functioning.
It would be used in a way that completely abstracts other components such as the networking, builder, state, etc.

Some work has been started in the integration_vm_simulator branch.
It defines a barebone TestVM that can be used to send transactions and apply results to the state.
It also supports snapshots, which can be used to rollback to a specific point in time while retrieving the current environment and state. Again, in an effort to avoid too much boilerplate and favor fixture-based testing.

Inspirations from LiteSVM, bankrun, solana-program-test, solana-validator-test

LiteSVM and Bankrun are both wrappers on top of solana-program-test which also targets testing the vm. solana-validator-test is focusing on e2e testing where transactions are sent to an actual node, that is a different use-case.

@iFrostizz iFrostizz self-assigned this Aug 2, 2024
@iFrostizz iFrostizz linked a pull request Aug 5, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant