jenkinsselenium-webdriverjunitcucumbertest-runner

How to configure multiple jenkins jobs with different Test Runners?


We have around 80 feature files and 1 Test Runner. We have integrated the automation suite with Jenkins and the tests are running fine. We are mentioning the folder path of the feature file in the Test Runner file, it is executing all the 80 feature files. The problem is, it takes lots of time to finish the execution. Is there any possibility to have multiple Jenkins jobs running with different test runners with 20 features in each? The whole idea is to split these features into smaller chunks and run them in parallel on different jenkins servers.

We tried configuring different Jenkins jobs but for each job we had to check in the code with changes in the feature files before triggering the job.


Solution

  • If you are using maven as build tool, here is a simple solution which you can override the CucumberOptions from command line as following and you can configure your Jenkins job to trigger that command :

    mvn test -Dcucumber.options="pathOfTheFeatureFiles/desiredFeatureFile.feature"
    

    For whole feature files, you can separate your jobs depending on the feature files and you can define different commands for different feature files.