Skip to content

Update tests #715

Closed
Closed
@bart-degreed

Description

@bart-degreed

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions