Skip to content

Commit

Permalink
#189: Support 'stopOnFail' configuration file setting
Browse files Browse the repository at this point in the history
  • Loading branch information
bradwilson committed Jul 1, 2023
1 parent 671542c commit 5e96160
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

<PropertyGroup>
<MicrosoftNetCoreAppRefVersion>6.0.11</MicrosoftNetCoreAppRefVersion>
<MicrosoftNetTestSdkVersion>17.6.2</MicrosoftNetTestSdkVersion>
<MicrosoftNetTestSdkVersion>17.6.3</MicrosoftNetTestSdkVersion>
<MicrosoftSourceLinkGitHubVersion>1.1.1</MicrosoftSourceLinkGitHubVersion>
<MicrosoftTestPlatformObjectModelVersion>17.6.2</MicrosoftTestPlatformObjectModelVersion>
<NerdbankGitVersioningVersion>3.6.133</NerdbankGitVersioningVersion>
<NSubstituteVersion>5.0.0</NSubstituteVersion>
<TunnelVisionLabsReferenceAssemblyAnnotatorVersion>1.0.0-alpha.160</TunnelVisionLabsReferenceAssemblyAnnotatorVersion>
<XunitAnalyzersVersion>1.2.0-pre.27</XunitAnalyzersVersion>
<XunitVersion>2.5.0-pre.37</XunitVersion>
<XunitAnalyzersVersion>1.2.0-pre.48</XunitAnalyzersVersion>
<XunitVersion>2.5.0-pre.43</XunitVersion>
</PropertyGroup>

</Project>
5 changes: 5 additions & 0 deletions src/xunit.runner.visualstudio/VsTestRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,11 @@ void RunTestsInAssembly(
resultsSink.Finished.WaitOne();

reporterMessageHandler.OnMessage(new TestAssemblyExecutionFinished(assembly, executionOptions, resultsSink.ExecutionSummary));
if (resultsSink.ExecutionSummary.Failed != 0 && executionOptions.GetStopOnTestFailOrDefault())
{
logger.Log("Canceling due to test failure...");
cancelled = true;
}
}
catch (Exception ex)
{
Expand Down

0 comments on commit 5e96160

Please sign in to comment.