1. Click the Manage Jenkins link on the left-hand navigation:
2. Click Manage Plugins
3. Click Advanced Tab on the Manage Plugins Page
4. Click Choose File and locate the Jenkins-cucumber.hpi file you downloaded earlier
Click Upload to upload the hpi file to the Jenkins server
5. Click the Available Tab and scroll down to the bottom of the page
Click the install without restart button
6. Check the Restart Jenkins when installation is complete and no jobs are running box
7. After Jenkins restarts go back to the Manage Plugins page and click the Installed Tab
Check cucumber-reports is installed and is ticked and the version is correct
Configure the Plugin Once Installed
1. Ruby Cucumber – Open the configuration page for your job
If you are using ruby cucumber add a build shell step with cucumber --format json -o cucumber.json
Check the box: Publish cucumber results as a report
Enter the path relative to the job workspace where your cucumner.json file that you specified in the build step above is generated
2. Cucumber JVM – Open the configuration page for your job
If you are using maven and cucumber-jvm add a build shell step with maven clean install
Check the box: Publish cucumber results as a report
Enter the path relative to the job workspace where your cucumber.json file that you specified in the build step above is generated
3. Link to the report
Once the report is generated you can open it via link displayed on project details panel or on the job panel
Notes on Configuration
The Json Reports Path field in the config should point to the directory where your cucumber.json file is generated. So the easiest way to check is to view the job workspace (click on the workspace link from the job page) and click down the directory structure until you find where your cucumber.json file lives. (assuming you have run the build at least once) then enter the path in the config field: e.g. target if your workspace contains the directory target at the top level and you use maven. If your target directory is further down in your file structure – put the path to it e.g. dir1/dir2/target
The field already supplies the path to the workspace with a trailing slash (/) so you just need to supply the bit afterward e.g. [/path/to/the/workspace/] target <– you supply this bit (target)
The second config field is for when you have Jenkins installed somewhere other than the default hostname:8080 – if you have it at http://hostname:8080/jenkins then the assets and stylesheets won’t be found and you have to supply the path to it which in this case would be: /jenkins/