You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A part of the custom xUnit RazorTestDiscoverer that is currently missing is the ability to lookup the test in a .razor file, by double clicking on the test in the VS Test Explorer (and perhaps also in VS Code and others.
To do so, all RazorTestCases must be provided with a ISourceInformation, which contains a file path to the .razor file and a line number.
It should be possible to use the System.Reflection.Metadata package to get the filename of the generated test component's .cs file, based on the type and assembly the razor test available in the test discoverer, and then from the .cs file find the .razor file and figure out the line number.
A part of the custom xUnit
RazorTestDiscoverer
that is currently missing is the ability to lookup the test in a .razor file, by double clicking on the test in the VS Test Explorer (and perhaps also in VS Code and others.To do so, all
RazorTestCase
s must be provided with aISourceInformation
, which contains a file path to the .razor file and a line number.It should be possible to use the
System.Reflection.Metadata
package to get the filename of the generated test component's .cs file, based on the type and assembly the razor test available in the test discoverer, and then from the .cs file find the .razor file and figure out the line number.Initial attempts with the metadata API hasn't been successful though: https://github.com/egil/FindSourceFilePath
This depends on #103 PR being merged.
The text was updated successfully, but these errors were encountered: