0

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?

UNG
  • 613
  • 6
  • 16

2 Answers2

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,102
  • 1
  • 14
  • 21
  • Thank you Andreas! Will definitely try this out! – UNG Oct 25 '16 at 06:15
  • Andreas, I tried using tag, although it works fine for single tags example: @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? – UNG Nov 04 '16 at 12:16
  • 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
  • Yup it worked! You are a Lifesaver Andreas! Thanks again! – UNG Nov 07 '16 at 08:21
-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

csabinho
  • 1,451
  • 1
  • 13
  • 22
Renu
  • 1