HomeChallengesRepsProblemsLeaderboardTake a challenge

The suite that only fails on CI

Shared state, a static context and a blocking .Result. Make every test independent.

Advanced22 min on the clock5 graded checks · 100 pointsTesting an ASP.NET Core APIPro
Graded by reading your code against the checklist below.

What you build

  • Give every test its own database rather than one shared store
  • Remove the static shared context
  • Set up and tear down with IAsyncLifetime
  • Await the async calls instead of blocking on them
  • Add a second test that proves the first one’s rows are not visible to it

Done means

No shared state, a unique store per test, async throughout, and two tests that cannot see each other.

How it is graded

Published in full, before you start — every point is one of these and there is nothing else.

  1. Every test gets its own database+25Tests that do not depend on each other
  2. The static shared context is gone+20Tests that do not depend on each other
  3. Setup and teardown use IAsyncLifetime+20Tests that do not depend on each other
  4. Async calls are awaited, not blocked on+20async and await
  5. A second test proves the isolation holds+15Tests that do not depend on each other

What it teaches

The rest of Testing an ASP.NET Core API