Open SabotageAndi opened 3 years ago
@SabotageAndi So I am starting to just have a play around in a new branch, what is the best way for me to test my changes to ensure that they work?
@HermanCodes add a reference to the local project inside of your plugin. Lets spend some time on discord this week working through it
For xUnit, you will see the changes immediately because we are using it to build the specs of SpecFlow with it. So I would start writing a scenario for this feature and then start getting it to get working. First that SpecFlow itself compiles again and then run the scenarios for the different unit test provider until they are green,
Link to Feature Request
No response
Implementation Idea
It is possible to have multiple Example tables/set and name then.
Like this:
At the moment it is not possible to access the name of the Example Set/Table at Runtime.
What needs to be changed that we can get this at Runtime?
ScenarioInfo
with a property for it and This should be a readonly string property namedExampleTableName
, which get set via the constructorValues of the property: Scenario:
String.Empty
Scenario Outline - no name specified at the example table: ExampleSet 0 - the same as currently - https://github.com/SpecFlowOSS/SpecFlow/blob/master/TechTalk.SpecFlow.Generator/Generation/UnitTestMethodGenerator.cs#L329 Scenario Outline - name specified: the specified nameGeneral: Add an additional parameter to the generated testmethods to accept the example table name - https://github.com/SpecFlowOSS/SpecFlow/blob/master/TechTalk.SpecFlow.Generator/Generation/UnitTestMethodGenerator.cs#L486
xUnit: The name of the example table has to be added to the generation of the InlineDataAttribute - https://github.com/SpecFlowOSS/SpecFlow/blob/master/TechTalk.SpecFlow.Generator/UnitTestProvider/XUnit2TestGeneratorProvider.cs#L88
NUnit: The name of the example table has to be added to the generation of the TestCaseAttribute - https://github.com/SpecFlowOSS/SpecFlow/blob/master/TechTalk.SpecFlow.Generator/UnitTestProvider/NUnit3TestGeneratorProvider.cs#L141
MSTest: This is a little bit trickier because we don't support the DataRow attribute yet. Probably the changes have to made at https://github.com/SpecFlowOSS/SpecFlow/blob/master/TechTalk.SpecFlow.Generator/UnitTestProvider/MsTestGeneratorProvider.cs#L200 or https://github.com/SpecFlowOSS/SpecFlow/blob/master/TechTalk.SpecFlow.Generator/UnitTestProvider/MsTestV2GeneratorProvider.cs#L78
SpecFlow+ Runner: We will take care of it
Please also add unit tests and some scenarios to our tests for this.