Open csurfleet opened 6 years ago
I did a few hour investigation of this issue - my findings are.
xUnit only supports tests being "methods" (not a class) the xUnit implementation that calls IXunitTestCaseDiscoverer only parses in method's that have been decorated with FactAttribute (or a derived type).
Current implementation "fakes" the relationship between method and the feature class by having a internal method Scenario in Feature.cs this where the test runner will open when double clicking.
The way Specflow handles this is by generating some code behind that can be referenced (i dont know how/why it is able to jump to the Gherkin feature file).
Code generation I'm not sure this is a good solution as the testrunner will only take you to the auto generated code which will probably be useless.
xUnit might have another way to discover tests that is possible to hook into I think a good place to start is in ExtensibilityPointFactory.cs (Xunit.Sdk) which defines the different points of extensibility
Hack
It would be great if the scenarios in the test runner behaved like normal tests - double clicking to take you to the test in code. Ideally this would open the scenario file, or if not the steps file would be reasonable
I'm not sure if this is even possible, but I'll take a look in the next few days.