Skip to content
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

Missing code_file_path and line_number custom properties #28

Open
edumserrano opened this issue Dec 24, 2021 · 2 comments
Open

Missing code_file_path and line_number custom properties #28

edumserrano opened this issue Dec 24, 2021 · 2 comments

Comments

@edumserrano
Copy link

Looking at the properties that can be used in custom templates I can see that the following properties in result_sets are supported:

code_file_path code file containing test
line_number - line number of the test

However when I try to use them the line_number is always zero and the code_file_path is always empty. The same is visible is the example output in the properties docs:


Duration: 00:00:00.0103816
Source: C:\github\LiquidTestReports\test\SampleProject\SampleProject.Tests.xUnit\bin\Debug\netcoreapp3.1\SampleProject.xUnit.dll
Executed Tests Count: 6
None Count: 0
Passed Count: 2
Failed Count: 3
Skipped Count: 1
Not Found Count: 0


Display: SampleProject.xUnit.TestServiceTests.TestTheory(expected: True)
Outcome: Passed
Error Message: 
Error Stack: 
ComputerName: DESKTOP-PNKUUD7
Duration: 00:00:00.0103816
StartTime: 18/08/2020 9:12:23 PM +10:00
EndTime: 18/08/2020 9:12:23 PM +10:00
Traits : 
Result Message Text: Running SampleProject.Tests.xUnit tests

Result Message Category: StdOutMsgs


Id: 8a3de9d4-fda6-4f04-f546-244cf03ac6c2
FQN: SampleProject.xUnit.TestServiceTests.TestTheory
Display Name: SampleProject.xUnit.TestServiceTests.TestTheory(expected: True)
Executor URI: executor://xunit/VsTestRunner2/netcoreapp
Source: C:\github\LiquidTestReports\test\SampleProject\SampleProject.Tests.xUnit\bin\Debug\netcoreapp3.1\SampleProject.xUnit.dll
Code File Path: 
Line Number: 0
Traits: 

Is this a known issue or am I missing something?

@edumserrano
Copy link
Author

Perhaps related with Missing source information (CodeFilePath, LineNumber) in discovered test cases for .NET Core (3.x?) projects with "Full" PDB (instead of "Portable" PDB) ? However, in my case, changing the DebugType to Portable didn't help.

@kurtmkurtm
Copy link
Owner

I have tested this across a few frameworks and versions and also wasn't able to get line numbers.
I will leave this issue open and update if something changes with VSTest to resolve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants