I am trying to track down a bug in my Xunit acceptance tests on Azure Pipelines and want to enable stoponfail to make the problem easier to track down. It's an intermittent timing thing, so hard to reproduce running tests locally.
I have the following in my yml for Azure Pipelines
- task: DotNetCoreCLI@2
displayName: dotnet test
inputs:
command: test
arguments: '--configuration $(BuildConfiguration) --no-build --verbosity $(Verbosity)'
It sounds like the only way to make Xunit stop on first failure is with the -stoponfail
argument. Unfortunately, this isn't compatible with dotnet test
. Further, if I switch to running dotnet xunit
instead of dotnet test
I can no longer use my existing build script and need to install the dotnet xunit extension during my build pipeline. Even further - it doesn't look like dotnet xunit
will emit trx files, which makes it fairly useless in the context of a CI pipeline.
What are other people doing to be able to use Xunit and stop on failure?