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

Rigorous API testing #9

Open
rien opened this issue Jul 27, 2020 · 0 comments
Open

Rigorous API testing #9

rien opened this issue Jul 27, 2020 · 0 comments

Comments

@rien
Copy link
Collaborator

rien commented Jul 27, 2020

The integration tests are very slow because after each test the database is reset. Unless Rocket/Diesel has support transactional testing (every test is performed within a transaction which can be rollback'ed), we should consider using an alternative testing strategy.

I think we need full system tests here: setting up a production like environment with real data and launching actual HTTP API requests (without clearing the database each time). This does not need to be programmed within Rust, but can be a separate tool or script which is ergonomic to use.

As we want an API description in the future, it's worth looking at tools which can use an open API description and use that to automate endpoint testing.

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

No branches or pull requests

1 participant