Faster .NET CI/CD pipelines with test filters

01.15.2021 | Testing Backend | Ryan Taylor


Sluggish integration and delivery pipelines leave developers vulnerable to distraction. If your unit and integration tests live in one .csproj and run in both CI and CD, tune your pipeline stages to run only relevant tests.

The Tests

public async Task ThisTest_ShouldBeAUnitTest() 
   // Useful unit test

public async Task WhenThisThingDoesX_ThatThingShouldDoY() 
   // Useful integration test

Tuning the Pipelines

To run only unit tests in CI: dotnet test --filter Category=Unit

To run only integration tests in CD: dotnet test --filter Category=Integration

--- Photo credit: Andrew Parnell


Read More

Related Posts


06.30.2021 | Culture | Katy Scott

At Focused Labs, collaboration is key to how we work together; it helps our teams learn from each other, brings us closer and helps us become more efficient...


06.23.2021 | Culture | Austyn

Late-night feedings and diaper changes, the 3-4 month sleep regression, teething, and a growth spurt all mean I'm getting less sleep than...


05.12.2021 | Culture Backend Frontend | Ryan Taylor

Temporarily disrupts "normal" business operations and allow self-organized teams to rapid prototype around their interest areas


04.27.2021 | Culture | Erin Hochstatter

Several years ago, I'd been trying to find an approach to software consulting that made sense for me [...]


01.28.2021 | Backend | Parker Drake

Recently I found myself needing to validate fields in a Spring Boot controller written in Kotlin...


01.22.2021 | Tutorial | Luke Mueller

⌘+⇧+g is the way to go


01.21.2021 | Devops | Katy G

Kube jobs running wild? To delete successful jobs...

additional accent

171 N Aberdeen St
Suite 400
Chicago, IL 60607

© 2021 FocusedLabs, All Rights Reserved.

  • facebook icon
  • twitter icon
  • linkedin icon
  • github icon