Improve WASM test output via xharness (#42860)
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Mon, 5 Oct 2020 10:37:49 +0000 (12:37 +0200)
committerGitHub <noreply@github.com>
Mon, 5 Oct 2020 10:37:49 +0000 (12:37 +0200)
commitbd33fc4e4a3382422bee156cd66a45a13521ec58
treecd10585bdc05a265a20473ca6c19ab136baa5cd2
parentf63b6f0a1b3ffd35dc1253226984a8d20bd4d91b
Improve WASM test output via xharness (#42860)

With https://github.com/dotnet/xharness/pull/315 we can now make the test output similar to the regular xunit desktop runner.
It no longer prints the passed tests by default, only failing tests. To get the old behavior, add the `-v` flag back to xharness in tests.mobile.targets or check the new wasm-console.log file in the xharness-output folder.

```
  XHarness command issued: wasm test --app=. --engine=V8 --engine-arg=--stack-trace-limit=1000 --js-file=runtime.js --output-directory=/Users/alexander/dev/runtime/artifacts/bin/System.Runtime.Handles.Tests/net5.0-Release/browser-wasm/AppBundle/xharness-output -- --run WasmTestRunner.dll System.Runtime.Handles.Tests.dll -notrait category=OuterLoop -notrait category=failing
  info: 21:57:45.3244690 v8 --expose_wasm --stack-trace-limit=1000 runtime.js -- --run WasmTestRunner.dll System.Runtime.Handles.Tests.dll -notrait category=OuterLoop -notrait category=failing
  info: Arguments: --run,WasmTestRunner.dll,System.Runtime.Handles.Tests.dll,-notrait,category=OuterLoop,-notrait,category=failing
  info: console.debug: MONO_WASM: Initializing mono runtime
  info: console.debug: MONO_WASM: ICU data archive(s) loaded, disabling invariant mode
  info: console.debug: mono_wasm_runtime_ready fe00e07a-5519-4dfe-b35a-f867dbaf2e28
  info: Initializing.....
  info: Discovering: System.Runtime.Handles.Tests.dll (method display = ClassAndMethod, method display options = None)
  info: Discovered:  System.Runtime.Handles.Tests.dll (found 14 of 15 test cases)
  info: Starting:    System.Runtime.Handles.Tests.dll
  fail: [FAIL] SafeWaitHandleTests.SafeWaitHandle_False
  info: Assert.False() Failure
  info: Expected: False
  info: Actual:   True
  info:    at SafeWaitHandleTests.SafeWaitHandle_False()
  info:    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
  info: Finished:    System.Runtime.Handles.Tests.dll
  info:
  info: === TEST EXECUTION SUMMARY ===
  info: Total: 14, Errors: 0, Failed: 1, Skipped: 0, Time: 0.097211s
  info:
  info: 21:57:46.3323620 Process exited with 1
```
.config/dotnet-tools.json
eng/Version.Details.xml
eng/Versions.props
eng/testing/tests.mobile.targets
global.json
src/libraries/sendtohelixhelp.proj