Skill page Testing v1.0.0

NUnit Testing

Write, run, or repair .NET tests that use NUnit. Use when a repo uses `NUnit`, `[Test]`, `[TestCase]`, `[TestFixture]`, or NUnit3TestAdapter for VSTest or Microsoft.Testing.Platform execution.

Trigger On

  • writing or reviewing NUnit tests
  • using [Test], [TestCase], [TestFixture], [SetUp], [TearDown] attributes
  • configuring NUnit3TestAdapter or NUnit.Analyzers
  • migrating between NUnit versions
  • integrating NUnit with CI pipelines

Deliver

  • NUnit tests following the Arrange-Act-Assert pattern
  • Parameterized tests with [TestCase] and [TestCaseSource]
  • Constraint-based assertions with Assert.That
  • Proper test lifecycle management

Validate

  • Tests are independent and isolated
  • No hardcoded test data where parameterization is appropriate
  • Async tests use async Task not async void
  • Resources are properly disposed in [TearDown] or [OneTimeTearDown]
  • NUnit.Analyzers enabled to catch common issues

Related skills

Use the open-source free `ReportGenerator` tool for turning .NET coverage outputs into HTML, Markdown, Cobertura, badges, and merged reports.

dotnet skills install reportgenerator