question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Test result do not show because the extension pick the wrong result file.

See original GitHub issue

Environment

image

>dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   3.0.100-preview3-010431
 Commit:    d72abce213

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.17763
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\3.0.100-preview3-010431\

Host (useful for support):
  Version: 3.0.0-preview3-27503-5
  Commit:  3844df9537

.NET Core SDKs installed:
  3.0.100-preview3-010431 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0-preview3-19153-02 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.0.0-preview3-27503-5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 3.0.0-preview3-27504-2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

Steps to reproduce

Create a test project with dotnet new nunit and create a guarantee passed test (e.g : Assert.AreEqual(1,1) ). Test pass in the Test Explorer Log but the icon near the selected test spin forever :

image

Expected behaviour

CodeLens and test explorer panel in side bar show tick or pass/fail.

Actual Behaviour

The tick or pass/fail was not shown, in progress icon spin forever.

Note

As you can see, the test result was generated in the windows temp folder, so this is not a permission issue (I tried to change the path to D:\temp but it didn’t work). The important information is the vscode devtool console log:

ERR ENOENT: no such file or directory, unlink 'C:\Users\KOMI-S~1\AppData\Local\Temp\test-explorer\0.trx': Error: ENOENT: no such file or directory, unlink 'C:\Users\KOMI-S~1\AppData\Local\Temp\test-explorer\0.trx'
	at Object.fs.unlinkSync (fs.js:1061:3)
	at ReadFileContext.parseResults.fs.readFile [as callback] (C:\Users\Komi-San-Supporter\.vscode\extensions\formulahendry.dotnet-test-explorer-0.6.4\out\src\testResultsFile.js:64:20)
	at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:352:13)

It tried to read a file named 0.trx but the actual file created was 0_2019-03-09_19-06-35-471.trx . Then, I tried to rename one of the old results file to 0.trx and run test again, everything worked! The result was show in both editor and side bar (of course it is not the actual result, I just want to verify which file the extension read) and the 0.trx was deleted!

In addition, I tried to install older version of the extension: 0.6.0 -> 0.6.3 and 0.5.0 (the 0.5.0 didn’t log to the devtool console but the rename trick work) and still had the same issue.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
Fubuchicommented, Mar 17, 2019

It work with net core 3.0 now, thank you for the hard work 💯 image

1reaction
stefanforsbergcommented, Mar 16, 2019

Ok thanks. I think we’ll have to re-write how we fetch the test results file then in order to be compatible with how the sdk is going to work in coming versions. Thanks a lot for reporting!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting Code Coverage - Visual Studio (Windows)
What you should see; Possible reasons for seeing no results or old ... If you choose an Analyze Code Coverage command on the...
Read more >
VS Code not finding pytest tests - python
(No idea what the cause is, can't see any error logged anywhere with that newer extension version, just acts as if the project...
Read more >
Testing Extensions - Visual Studio Code
We refer to these tests as integration tests, because they go beyond unit tests that can run without a VS Code instance. This...
Read more >
Running a t-test in Excel
If you do not see the “Data Analysis” option, you will need to install the add-in. Do this by clicking on “File” in...
Read more >
Unit test reports - GitLab Docs
First, GitLab Runner uploads all JUnit report format XML files as ... If parsing JUnit report XML results in an error, an indicator...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found