Maven: How to only execute certain Cucumber tags

I needed Maven to only run certain tests that had a specific tag (i.e., @regression).  I couldn’t easily find information via the Cucumber website, so I’m logging it her for archiving.  Note: This command also works in Jenkins via the “Goals and options” section.

clean install -Dcucumber.options="--tags @regression"

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.