Sunday, April 12, 2020

Cucumber Selenium test automation framework using C# - Part 6 - Filtering tests using tags

Prerequisites


Please complete Part 5 of this tutorial before continuing.


Filtering tests using tags


1) Before this, add a new scenario to the feature file and implement steps for as given below.



2) Add SpecRun profile to the project as given below. SpecRun profile will be used to add configurations on how the test suite should run. 



3) In the SpecRun profile add the filter tag to filter the scenarios you need to run. Filter can be applied to feature file or scenario.


4) Now build the project and see if test explorer shows both scenarios as given below.


5) Remove or change @google tag on one scenario and then rebuild the project. Navigate to test explorer. Test explorer should only show the scenario with google tag name.


No comments:

Post a Comment