Trying to create a test suite , in which I do not want to include all the feature files. Is that possible? This is in the lines of TestNG.xml test suite. Does Specflow provide any such feature? Is there any documentation for tags in Default.srprofile, using which I can manipulate to include/exclude feature files I want to run?
Asked
Active
Viewed 927 times
0
-
Have you tried using the @ignore tag http://stackoverflow.com/a/2966701/7038423 – tonybasran Oct 21 '16 at 19:06
2 Answers
2
You can configure filtering for Tags/Features/Scenarios in the Default.srProfile.
See the documentation here: http://www.specflow.org/plus/documentation/SpecFlowPlus-Runner-Profiles/#Filter

Andreas Willich
- 5,665
- 3
- 15
- 22
-
-
Andreas, I tried using
tag, although it works fine for single tags example: – UNG Nov 04 '16 at 12:16@smoke , it does not work when@smoke & @new in Default.srnprofile. that is when I compile the solution in Visual Studio, the Test Explorer does not list any tests. Am I missing something? -
These are filters, so with '@smoke & @new' you filter for scenarios with both tags. You want probably all scenarios with '@smoke' or '@new'. So set the filter to '@smoke|@new' – Andreas Willich Nov 04 '16 at 12:56
-
-
new link to filter doc: https://docs.specflow.org/projects/specflow-runner/en/latest/Profile/Filter.html?highlight=filter – Jakob Ojvind Nielsen Nov 30 '22 at 14:59
-1
https://stackoverflow.com/users/3155323/andreas-willich
@smoke
scenario: B
.....
@new
Scenario: A
--filter "@smoke | @new"
The ordered way of running test is not happening. It runs based on alphabetical order of how scenarios are defined