How to create a single method per scenario, rather than one method per GIVEN/WHEN/THEN/AND #335
-
I would like to have reqnroll create only one single method per Scenario, rather than multiple methods. The reason for this is that when running in Azure Devops, I need to create multiple Azure Devops Test Cases because the Associated Automation can only link to one test. This becomes a problem when using tables, as I would need to create one DevOps Test Case for EACH row in the table. This is quite cumbersome. Also, I find having multiple methods per scenario to be a bit excessive and un-necessary, and a bit of a management headache when I have potentially hundreds of scenarios. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
You can set the (Self promo: you can also check SpecSync - a commercial tool to ensure that the scenarios and their results are in sync with Azure DevOps Test Cases.) |
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply. This suggestion still creates one test per row in the table, which will need one Azure DevOps Test Case for each row/test. |
Beta Was this translation helpful? Give feedback.
-
@galabad71 ah sorry. I misread your question. You want the opposite. That should be the default anyway. Which version of Reqnroll you use? Is it MsTest? |
Beta Was this translation helpful? Give feedback.
-
My apologies for net describing the issue clearly. When "allowRowTests": true then Test Explorer in Visual Studio sets each row in a table to be a sub-test under the scenario. either way (true or false), I still need to have one Azure DevOps Test Case per row in the scenario examples table. I cannot associate an Azure DevOps Test Case to the ScenarioOutline, I need to create one Azure DevOps Test Case for each row in the Examples table. |
Beta Was this translation helpful? Give feedback.
There is no good solution for this. The azure devops test case association does not support data-driven test methods, but if there are individual methods for each example, you need many test cases. This test case association functionality is very limited.