1325 questions for senior .NET engineer interviews, each with a 30-second answer, the full answer, a deep dive, the follow-ups interviewers ask next, and real-world production problems.
Testing .NET 10 systems with confidence: the test types and when each pays off, the .NET testing tools (xUnit, NSubstitute, Testcontainers, WebApplicationFactory), good testing practice, and senior topics such as legacy code, async and time, flaky tests and contract testing.
Unit, integration and end-to-end tests: what each proves, their speed, cost and failure signal, and where the boundaries sit in a .NET 10 ASP.NET Core API.
Smoke, regression and functional tests: what each checks, how they overlap with unit, integration and E2E tests, and where they run in a CI/CD release pipeline.
Integration tests for ASP.NET Core 10 APIs: WebApplicationFactory, real SQL Server with Testcontainers, faking third-party HTTP and authentication, and keeping state isolated and the suite fast.
Load, stress, soak and spike tests as distinct test types: the question each answers, workload shapes, tool choice (k6, Azure Load Testing, NBomber and its licence), pass/fail criteria and what to read in the results for a .NET 10 API.
Mutation testing with Stryker.NET: why line coverage overstates test quality, how mutants are generated and killed, mutation score and thresholds, surviving mutants, incremental runs and run-time cost.
Designing a test strategy for a new .NET 10 service: choosing test types by risk, the shape and size of each layer, where each runs in CI/CD, merge and release gates, ownership, and the metrics that show whether the strategy works.
A real-world escaped defect despite high coverage: diagnosing why the suite missed it (mocked boundaries, missing contract and integration tests, weak assertions), the incident response, and the test strategy changes that followed.
Sharing an expensive test resource (such as a SQL Server container) across xUnit test classes with IAsyncLifetime, class, collection and xUnit v3 assembly fixtures, and keeping tests independent with Respawn or unique keys.
The five kinds of test double (dummy, stub, fake, mock, spy), how they differ in state versus interaction verification, and when a hand-rolled fake beats a mocking library in .NET 10 tests.
When snapshot testing with Verify beats explicit assertions, how .verified and .received files, scrubbing and accepting changes work, and how to keep snapshots reviewable and maintainable.
Preventing a NuGet update from silently bringing in a new licence: Central Package Management, pinned majors and lock files, Dependabot ignore rules, CI licence allow-lists (dependency-review-action, nuget-license), and treating test packages like production dependencies.
Wiring a Testcontainers SQL Server into WebApplicationFactory: container lifecycle with IAsyncLifetime, overriding the connection string, migrating once, resetting with Respawn, and sharing one container across classes with a database per class.
Configuring HttpClient resilience in .NET 10 with Microsoft.Extensions.Http.Resilience (the standard handler's strategies and defaults, attempt versus total timeout, no blind retries on unsafe methods, custom Polly pipelines) and testing it deterministically with WireMock.Net.
Managing test data at each level of the test pyramid without production data: builders and object mothers for unit tests, unique data and Respawn resets for integration tests, seeded synthetic data (Bogus) for end-to-end environments, edge cases, versioned seed scripts, and Australian privacy obligations.
A team-level approach to flaky tests in .NET: measuring flakiness from CI test reports, reproducing failures (loops, parallelism, limited CPU, blame options), the common root causes, a visible quarantine with an owner and deadline, and prevention with TimeProvider, banned-API analysers, xUnit analysers and a flaky-rate dashboard.
Compares xUnit, NUnit and MSTest on test-class lifecycle, setup and teardown, shared fixtures, data-driven tests and parallel execution, and covers xUnit v3 and Microsoft.Testing.Platform on .NET 10.
Covers creating substitutes with NSubstitute and Moq, configuring returns, argument matchers, verifying received calls, throwing exceptions, async members, analysers, and the 2023 Moq SponsorLink supply-chain controversy.