-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XUnit inline data is lost after test is run #267
Comments
Uh, is this some issue with the new parsing? I'll have a look in the next few days I think |
@GeorchW Hey, that is what I suspected at first but I tried it with the 0.7.1 release and it behaved in the same way. I didn't have a lot of time to troubleshoot over the weekend but will take a closer look this week. |
Hmm, I can't reproduce this issue, even if I disable all other extensions. |
Hmm, even if you open the xunit solution that is included in the repo (in the test folder)? |
Yes, that's the one I've tried it with. |
Hmm intriguing! I'll give it another go. |
I mean, the bug is probably somewhere here. I'm not sure why it makes sense to reset the discovered tests when changing the results. Oh, and while I'm at it, this three lines below is in O(n²). The filtering should probably be done with a set, not an array. Generally, this entire "loop through all tests" for each folder and each item, also seen in testNode.ts, is really inefficient code. |
@GeorchW I hear you but let's try to keep this thread about the original issue =) When I execute this command <TestDefinitions>
<UnitTest name="XunitTests.TestClass3.Fail(value: 2)" storage="d:\SomePath\vscode-dotnet-test-explorer\test\xunittests\bin\debug\netcoreapp3.1\xunittests.dll" id="5d23175e-8479-779f-39f4-23aa2608428b">
<Execution id="ceaf151e-e91c-4f92-ba85-4af475de7c28" />
<TestMethod codeBase="d:\SomePath\vscode-dotnet-test-explorer\test\xunittests\bin\Debug\netcoreapp3.1\XunitTests.dll" adapterTypeName="executor://xunit/VsTestRunner2/netcoreapp" className="XunitTests.TestClass3" name="Fail" />
</UnitTest>
</TestDefinitions> Since we are fetching the classname and method name from here it makes sense to me why the tree looks like it does but I don't really understand how it works for you. In order to rule out the possibility of different sdk versions containing different versions of vstest would you mind executing the above command in your context where things work and see if the resulting xml differ? |
Sure, this is the part for me: <TestDefinitions>
<UnitTest name="XunitTests.TestClass3.Fail(value: 2)" storage="/path/to/the/repo/vscode-dotnet-test-explorer/test/xunittests/bin/debug/netcoreapp3.1/xunittests.dll" id="5d23175e-8479-779f-39f4-23aa2608428b">
<Execution id="285b15ac-175b-4204-8d35-32dab901e73d" />
<TestMethod codeBase="/path/to/the/repo/vscode-dotnet-test-explorer/test/xunittests/bin/Debug/netcoreapp3.1/XunitTests.dll" adapterTypeName="executor://xunit/VsTestRunner2/netcoreapp" className="XunitTests.TestClass3" name="XunitTests.TestClass3.Fail(value: 2)" />
</UnitTest>
</TestDefinitions> Looks pretty similar to me... EDIT: nvm, I'm an idiot For context:
|
Ah ok, then we need to figure out why the trx-files are different. I’ll continue investigating tomorrow :) |
For me
If I downgrade my sdk version to the one you are running I get the expected behavior. So something has changed in the way the dotnet test command generates those trx-files (it's not the first time). If it was working in the later versions I think we could just tell people to upgrade but since that is not the case atm I'm not sure what the best way forward is. |
Do you know whether there is a TRX spec somewhere? I wonder what the difference between the properties I'll try to have a look at the code of the TRX writer in the .NET SDK, but I generally think that we need to file an issue against the SDK. |
I haven't found a specification and the code is a little hard to navigate. I've opened an issue there. |
By the looks of their response we might do well to start looking at the UnitTest/@name field. We might be able to use functionality to split a FQN into parts then right? I'm not sure at the top of my head what the implications for our implementation would be. And as you are alluding to in #269 it's hard to know if this field will be stable going forward. |
|
On test discovery

After tests have run

The text was updated successfully, but these errors were encountered: