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

Experiment with hypothesis for tests #94

Open
PGijsbers opened this issue Nov 8, 2023 · 2 comments
Open

Experiment with hypothesis for tests #94

PGijsbers opened this issue Nov 8, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@PGijsbers
Copy link
Contributor

Look into using hypothesis to expand test coverage, especially useful for tests which only confirm that the old and new endpoint behave the same (minus documented differences).

@PGijsbers PGijsbers added the enhancement New feature or request label Nov 8, 2023
@PGijsbers
Copy link
Contributor Author

Hypothesis does not work nicely with function-level fixtures (c.f. health-checks), which makes it hard to integrate cleanly with the current tests that test POST requests. For those tests, we need clean up and rollbacks to avoid unintended interactions with other tests through persistence in the database. It may be possible with some rewrites, should try initiating the app in main.py from a function, which might allow a separate "app" for each test case to be set up.

@PGijsbers
Copy link
Contributor Author

But we do currently use it for migration testing with API endpoints that have large search spaces (currently the data/list endpoint).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant