Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Libraries/Catch2Interface/Reporter/OverallResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class OverallResult
public string StdErr { get; private set; } = string.Empty;
public string StdOut { get; private set; } = string.Empty;
public bool Success { get; private set; } = false;
public bool Skipped { get; private set; } = false;

#endregion // Properties

Expand All @@ -53,6 +54,12 @@ public OverallResult(XmlNode node)
Success = Constants.Rgx_True.IsMatch(success);
}

var skipped = node.Attributes["skips"]?.Value;
if (skipped != null && skipped == "1")
{
Skipped = true;
}

double duration = 0.0;
if (double.TryParse(node.Attributes["durationInSeconds"]?.Value, _style, _culture, out duration))
{
Expand Down
8 changes: 8 additions & 0 deletions Libraries/Catch2Interface/TestResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ public TestResult(Reporter.TestCase testcase, Settings settings, bool combined)
Duration = _testcase.OverallResult.Duration;
Name = _testcase.Name;
Outcome = _testcase.OverallResult.Success ? TestOutcomes.Passed : TestOutcomes.Failed;
if(_testcase.OverallResult.Skipped)
{
Outcome = TestOutcomes.Skipped;
}
StandardOut = _testcase.OverallResult.StdOut;
StandardError = _testcase.OverallResult.StdErr;

Expand Down Expand Up @@ -420,6 +424,10 @@ void ExtractTestResult(XmlNode nodeGroup)
_testcase = testcase;

Outcome = _testcase.OverallResult.Success ? TestOutcomes.Passed : TestOutcomes.Failed;
if(_testcase.OverallResult.Skipped)
{
Outcome = TestOutcomes.Skipped;
}
Duration = _testcase.OverallResult.Duration;
StandardOut = _testcase.OverallResult.StdOut;
StandardError = _testcase.OverallResult.StdErr;
Expand Down