Skip to content
Merged
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
4 changes: 3 additions & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"sdk": {
"version": "8.0.100"
"version": "8.0.100",
"rollForward": "feature",
"allowPrerelease": false
}
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@
},
"engines": {
"node": ">=16.0.0"
}
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
2 changes: 1 addition & 1 deletion release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 16 additions & 6 deletions src/Components/TestExplorer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ module TestFrameworkId =
type TestResult =
{ FullTestName: string
Outcome: TestResultOutcome
Output: string option
ErrorMessage: string option
ErrorStackTrace: string option
Expected: string option
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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")

Expand All @@ -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 } } }

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading