Detailed Configuration

Sathya edited this page Oct 30, 2017 · 6 revisions

Step by Step Configuration

Install the Jenkins cucumber plugin

1. Click the manage Jenkins link on the left hand navigation:

manage Jenkins

2. Click Manage Plugins

manage plugins

3. Click Advanced Tab on the Manage Plugins Page

advanced

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

upload

5. Click the Available Tab and scroll down to the bottom of the page

  • Click the install without restart button

install

6. Check the Restart Jenkins when installation is complete and no jobs are running box

restart

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

installed

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

Configuration

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

Configuration

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

Link to the report

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 afterwards 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 wont be found and you have to supply the path to it which in this case would be: /jenkins/
  • The assets are retrieved from the path http://hostname:8080/name_of_plugin/plugin_files_are_here - so in the case above http://hostname:8080/jenkins would be http://hostname:8080/jenkins/name_of_plugin/various_assets - you would have to supply the path to the name_of_plugin with both the leading and trailing slash (/) e.g. /jenkins/
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.