How to Pass Cucumber Tags in Jenkins

Profile picture for user devraj

You can execute your Smoke or Regression suite by using Cucumber command line options along with Jenkins. You need to use Cucumber Dcucumber.options for that. Use below steps:

Step 1: Create New or Edit your existing Maven Project.

Step 2: Click on Configure

How to Pass Cucumber Tags in Jenkins

Step 2: Select checkbox This project is parameterized

cucumber tags jenkins

Step 3: Select Add Parameter -> Choice Parameter 

jenkins cucumber tags

Step 4: Give Name = Tags and Choices = smoke and regression [Do not use @ symbol, just specify name of the tag].

how to pass multiple cucumber tags in jenkins

Step 5: Specify Goals and Options and path of your pom.xml

cucumber jenkins integration

Step 6: Select Option and Build with Parameters 

How to Pass Cucumber Tags in Jenkins