diff --git a/global.json b/global.json index 33021c04..62f01add 100644 --- a/global.json +++ b/global.json @@ -1,5 +1,7 @@ { "sdk": { - "version": "8.0.100" + "version": "8.0.100", + "rollForward": "feature", + "allowPrerelease": false } } \ No newline at end of file diff --git a/package.json b/package.json index 7d9f649b..ceb94163 100644 --- a/package.json +++ b/package.json @@ -27,5 +27,6 @@ }, "engines": { "node": ">=16.0.0" - } + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } diff --git a/release/README.md b/release/README.md index e8b0d6f2..32914069 100644 --- a/release/README.md +++ b/release/README.md @@ -59,7 +59,7 @@ You find a version of this plugin pre-packaged with the FOSS debugger from Samsu ## How to Contribute -Ths project is hosted on [GitHub](https://github.com/ionide/ionide-vscode-fsharp) where you can [report issues](https://github.com/ionide/ionide-vscode-fsharp/issues), participate in [discussions](https://github.com/ionide/ionide-vscode-fsharp/discussions), fork +This project is hosted on [GitHub](https://github.com/ionide/ionide-vscode-fsharp) where you can [report issues](https://github.com/ionide/ionide-vscode-fsharp/issues), participate in [discussions](https://github.com/ionide/ionide-vscode-fsharp/discussions), fork the project and submit pull requests. ### Building and Running diff --git a/src/Components/TestExplorer.fs b/src/Components/TestExplorer.fs index f93aac27..a9929121 100644 --- a/src/Components/TestExplorer.fs +++ b/src/Components/TestExplorer.fs @@ -240,6 +240,7 @@ module TestFrameworkId = type TestResult = { FullTestName: string Outcome: TestResultOutcome + Output: string option ErrorMessage: string option ErrorStackTrace: string option Expected: string option @@ -312,7 +313,9 @@ module TrxParser = { Message: string option StackTrace: string option } - type Output = { ErrorInfo: ErrorInfo } + type Output = + { StdOut: string option + ErrorInfo: ErrorInfo } type UnitTestResult = { ExecutionId: string @@ -376,6 +379,8 @@ module TrxParser = let outcome = xpathSelector.SelectStringRelative(node, "@outcome") + let outputMessage = xpathSelector.TrySelectStringRelative(node, "t:Output/t:StdOut") + let errorInfoMessage = xpathSelector.TrySelectStringRelative(node, "t:Output/t:ErrorInfo/t:Message") @@ -387,12 +392,12 @@ module TrxParser = let success, ts = TimeSpan.TryParse(durationString) if success then ts else TimeSpan.Zero - { ExecutionId = executionId Outcome = outcome Duration = durationSpan Output = - { ErrorInfo = + { StdOut = outputMessage + ErrorInfo = { StackTrace = errorStackTrace Message = errorInfoMessage } } } @@ -1237,7 +1242,12 @@ module Interactions = match testResult.Outcome with | TestResultOutcome.NotExecuted -> testRun.skipped testItem - | TestResultOutcome.Passed -> testRun.passed (testItem, testResult.Timing) + | TestResultOutcome.Passed -> + testResult.Output + |> Option.iter (TestRun.appendOutputLineForTest testRun testItem) + + testRun.passed (testItem, testResult.Timing) + | TestResultOutcome.Failed -> let fullErrorMessage = match testResult.ErrorMessage with @@ -1248,10 +1258,10 @@ module Interactions = | None -> "No error reported" let msg = vscode.TestMessage.Create(!^fullErrorMessage) - msg.location <- TestItem.tryGetLocation testItem msg.expectedOutput <- testResult.Expected msg.actualOutput <- testResult.Actual + TestRun.showFailure testRun testItem msg testResult.Timing let mergeTestResultsToExplorer @@ -1303,7 +1313,6 @@ module Interactions = displayTestResultInExplorer testRun (treeItem, additionalResult)) let private trxResultToTestResult (trxResult: TrxParser.TestWithResult) = - // Q: can I get these parameters down to just trxResult? let expected, actual = match trxResult.UnitTestResult.Output.ErrorInfo.Message with | None -> None, None @@ -1320,6 +1329,7 @@ module Interactions = { FullTestName = trxResult.UnitTest.FullName Outcome = !!trxResult.UnitTestResult.Outcome + Output = trxResult.UnitTestResult.Output.StdOut ErrorMessage = trxResult.UnitTestResult.Output.ErrorInfo.Message ErrorStackTrace = trxResult.UnitTestResult.Output.ErrorInfo.StackTrace Expected = expected