I'm just a newbie in testing with Specflow and I have an issue when I use Scenario Outline.
My feature file as following: feature file and below is the name is auto generated name.
I just want to append the Test case ID for each row in the table outline, is there any way to control this?
I do this because the number of test case I need to test can up to 1000. So if I can append the test case ID in the suffix of the name that Specflow auto generate, I can save the time for mapping the test case to the test result.
Add a new column to "Examples" section (you can call it like "Test_ID"), fill it in with unique values. It should append your id to the end of the test name. It works in our case.
Or, as stated in the documentation:
For better traceability, the generated unit test method names are derived from the scenario outline title and the first value of the examples (first column of the examples table). It is therefore good practice to choose a unique and descriptive parameter as the first column in the example set. As the Gherkin syntax does require all example columns to have matching placeholders in the scenario outline, you can even introduce an arbitrary column in the example sets used to name tests with more readability.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With