Skip to content

Update tests #715

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

Closed
8 tasks done
bart-degreed opened this issue Apr 7, 2020 · 0 comments · Fixed by #941
Closed
8 tasks done

Update tests #715

bart-degreed opened this issue Apr 7, 2020 · 0 comments · Fixed by #941

Comments

@bart-degreed
Copy link
Contributor

bart-degreed commented Apr 7, 2020

Description

I would like to give the integration tests in this project a big overhaul. Things I would like to address:

  • Use WebApplicationFactory instead of TestServer
  • Update Startup/Program from IWebHostBuilder to IHostBuilder
  • Use a centralized set of typed deterministic (based on test name) Fakers and reuse them
  • Use FluentAssertions for more readable tests and better failure messages
  • Create a shared project with common building blocks, like executing a request, replacing an injected service etc.
  • Have unit tests that assert exact json-text output (guards against breaking changes)

I'm also thinking about running tests in parallel.

  • Each test class has its own database and factory, so classes can run in parallel
  • Within a test class, use a unique database name (guid appended) and server instance, then run its containing test methods sequentially on that
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

1 participant