How to create jenkins generic runner based on cucumber tags

Today we are going to jump a little bit in CI/CD with a generic jenkins runner based on cucumber tags. In this post will be detailed explained how to configure the runner and how to create the generic profile on real project, let’s start…

Creating maven profile based on failsafe plugin to run CucumberRunner.

The profile will contains the maven-failsafe-plugin to run java test, and how you know the cucumber runners is a simple java test.

In cucumber options we have [CDATA[${tags}]] here we will send tag name with -D options, Let’s consider an example : -Dcucumber.options=”–tags @UI “.

          <argLine>-Xmx1024m -Dfile.encoding=${}</argLine>
</profile> After adding the profile the <tags>--tags ~@ignore</tags> parameter should be add in pom.xml property.

Configure jenkins job:

An important part of jenkins job is to start our profile with maven command:


In order to run test based on another tag, just change the  @UI tag from following mvn command: clean install -Pgeneric-runner -Dcucumber.options=”–tags @UI “.

Or you can add multiple tags on your jenkins execution. Hope this will help you to improve your testing CI/CD.