Skip to content

Commit 5e96160

Browse files
committed
#189: Support 'stopOnFail' configuration file setting
1 parent 671542c commit 5e96160

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Versions.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
<PropertyGroup>
44
<MicrosoftNetCoreAppRefVersion>6.0.11</MicrosoftNetCoreAppRefVersion>
5-
<MicrosoftNetTestSdkVersion>17.6.2</MicrosoftNetTestSdkVersion>
5+
<MicrosoftNetTestSdkVersion>17.6.3</MicrosoftNetTestSdkVersion>
66
<MicrosoftSourceLinkGitHubVersion>1.1.1</MicrosoftSourceLinkGitHubVersion>
77
<MicrosoftTestPlatformObjectModelVersion>17.6.2</MicrosoftTestPlatformObjectModelVersion>
88
<NerdbankGitVersioningVersion>3.6.133</NerdbankGitVersioningVersion>
99
<NSubstituteVersion>5.0.0</NSubstituteVersion>
1010
<TunnelVisionLabsReferenceAssemblyAnnotatorVersion>1.0.0-alpha.160</TunnelVisionLabsReferenceAssemblyAnnotatorVersion>
11-
<XunitAnalyzersVersion>1.2.0-pre.27</XunitAnalyzersVersion>
12-
<XunitVersion>2.5.0-pre.37</XunitVersion>
11+
<XunitAnalyzersVersion>1.2.0-pre.48</XunitAnalyzersVersion>
12+
<XunitVersion>2.5.0-pre.43</XunitVersion>
1313
</PropertyGroup>
1414

1515
</Project>

src/xunit.runner.visualstudio/VsTestRunner.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,11 @@ void RunTestsInAssembly(
578578
resultsSink.Finished.WaitOne();
579579

580580
reporterMessageHandler.OnMessage(new TestAssemblyExecutionFinished(assembly, executionOptions, resultsSink.ExecutionSummary));
581+
if (resultsSink.ExecutionSummary.Failed != 0 && executionOptions.GetStopOnTestFailOrDefault())
582+
{
583+
logger.Log("Canceling due to test failure...");
584+
cancelled = true;
585+
}
581586
}
582587
catch (Exception ex)
583588
{

0 commit comments

Comments
 (0)