diff --git a/WoofWare.NUnitTestRunner.Lib/SurfaceBaseline.txt b/WoofWare.NUnitTestRunner.Lib/SurfaceBaseline.txt index be778eb..19db0cb 100644 --- a/WoofWare.NUnitTestRunner.Lib/SurfaceBaseline.txt +++ b/WoofWare.NUnitTestRunner.Lib/SurfaceBaseline.txt @@ -358,10 +358,12 @@ WoofWare.NUnitTestRunner.TrxOutcome.Parse [static method]: string -> WoofWare.NU WoofWare.NUnitTestRunner.TrxOutcome.Tag [property]: [read-only] int WoofWare.NUnitTestRunner.TrxOutcome.Warning [static property]: [read-only] WoofWare.NUnitTestRunner.TrxOutcome WoofWare.NUnitTestRunner.TrxOutput inherit obj, implements WoofWare.NUnitTestRunner.TrxOutput System.IEquatable, System.Collections.IStructuralEquatable -WoofWare.NUnitTestRunner.TrxOutput..ctor [constructor]: (string option, WoofWare.NUnitTestRunner.TrxErrorInfo option) +WoofWare.NUnitTestRunner.TrxOutput..ctor [constructor]: (string option, string option, WoofWare.NUnitTestRunner.TrxErrorInfo option) WoofWare.NUnitTestRunner.TrxOutput.ErrorInfo [property]: [read-only] WoofWare.NUnitTestRunner.TrxErrorInfo option WoofWare.NUnitTestRunner.TrxOutput.get_ErrorInfo [method]: unit -> WoofWare.NUnitTestRunner.TrxErrorInfo option +WoofWare.NUnitTestRunner.TrxOutput.get_StdErr [method]: unit -> string option WoofWare.NUnitTestRunner.TrxOutput.get_StdOut [method]: unit -> string option +WoofWare.NUnitTestRunner.TrxOutput.StdErr [property]: [read-only] string option WoofWare.NUnitTestRunner.TrxOutput.StdOut [property]: [read-only] string option WoofWare.NUnitTestRunner.TrxReport inherit obj, implements WoofWare.NUnitTestRunner.TrxReport System.IEquatable, System.Collections.IStructuralEquatable WoofWare.NUnitTestRunner.TrxReport..ctor [constructor]: (System.Guid, string, WoofWare.NUnitTestRunner.TrxReportTimes, WoofWare.NUnitTestRunner.TrxTestSettings, WoofWare.NUnitTestRunner.TrxUnitTestResult list, WoofWare.NUnitTestRunner.TrxUnitTest list, WoofWare.NUnitTestRunner.TrxTestEntry list, WoofWare.NUnitTestRunner.TrxTestListEntry list, WoofWare.NUnitTestRunner.TrxResultsSummary) diff --git a/WoofWare.NUnitTestRunner.Lib/TrxReport.fs b/WoofWare.NUnitTestRunner.Lib/TrxReport.fs index 96614b6..3b11151 100644 --- a/WoofWare.NUnitTestRunner.Lib/TrxReport.fs +++ b/WoofWare.NUnitTestRunner.Lib/TrxReport.fs @@ -290,6 +290,8 @@ type TrxOutput = { /// What the entity printed to standard output. StdOut : string option + /// What the entity printed to standard error. + StdErr : string option /// Description of any error the entity encountered. ErrorInfo : TrxErrorInfo option } @@ -305,6 +307,14 @@ type TrxOutput = childNode.AppendChild text |> ignore node.AppendChild childNode |> ignore + match this.StdErr with + | None -> () + | Some stderr -> + let text = doc.CreateTextNode stderr + let childNode = doc.CreateElement ("StdErr", XmlUtil.NS) + childNode.AppendChild text |> ignore + node.AppendChild childNode |> ignore + match this.ErrorInfo with | None -> () | Some errInfo -> node.AppendChild (errInfo.toXml doc) |> ignore @@ -317,6 +327,11 @@ type TrxOutput = | NodeWithNamedChild "StdOut" (OneChildNode "StdOut" (NoChildrenNode stdout)) -> Some stdout | _ -> None + let stderr = + match node with + | NodeWithNamedChild "StdErr" (OneChildNode "StdErr" (NoChildrenNode stdout)) -> Some stdout + | _ -> None + let errorInfo = match node with | NodeWithNamedChild "ErrorInfo" node -> @@ -330,6 +345,7 @@ type TrxOutput = | Ok errorInfo -> { StdOut = stdout + StdErr = stderr ErrorInfo = errorInfo } |> Ok diff --git a/WoofWare.NUnitTestRunner.Lib/version.json b/WoofWare.NUnitTestRunner.Lib/version.json index e128f3c..16bed39 100644 --- a/WoofWare.NUnitTestRunner.Lib/version.json +++ b/WoofWare.NUnitTestRunner.Lib/version.json @@ -1,5 +1,5 @@ { - "version": "0.10", + "version": "0.11", "publicReleaseRefSpec": [ "^refs/heads/main$" ], @@ -8,4 +8,4 @@ ":/Directory.Build.props", ":/README.md" ] -} \ No newline at end of file +} diff --git a/WoofWare.NUnitTestRunner/Program.fs b/WoofWare.NUnitTestRunner/Program.fs index f78a777..99a8c15 100644 --- a/WoofWare.NUnitTestRunner/Program.fs +++ b/WoofWare.NUnitTestRunner/Program.fs @@ -174,6 +174,7 @@ module Program = Output = { StdOut = None + StdErr = None ErrorInfo = None } RunInfos = @@ -277,11 +278,11 @@ module Program = Output = match i.StdOut, i.StdErr, exc with | None, None, None -> None - // TODO surely stderr can be emitted - | stdout, _stderr, exc -> + | stdout, stderr, exc -> Some { TrxOutput.StdOut = stdout + StdErr = stderr ErrorInfo = exc } } diff --git a/WoofWare.NUnitTestRunner/WoofWare.NUnitTestRunner.Test/TestTrx.fs b/WoofWare.NUnitTestRunner/WoofWare.NUnitTestRunner.Test/TestTrx.fs index 5df561e..fd446b9 100644 --- a/WoofWare.NUnitTestRunner/WoofWare.NUnitTestRunner.Test/TestTrx.fs +++ b/WoofWare.NUnitTestRunner/WoofWare.NUnitTestRunner.Test/TestTrx.fs @@ -197,6 +197,7 @@ Running all tests in /Users/patrick/Documents/GitHub/TestRunner/TestRunner/TestR Ensure version is monotonic: Not yet published NUnit Adapter 4.5.0.0: Test execution complete """ + StdErr = None ErrorInfo = None } Outcome = TrxOutcome.Failed