{jenkins-plugin-info:pluginId=robot|jiraComponent=robot-plugin}


Description

This plugin collects and publishes Robot Framework test results in Jenkins.


Preconditions: all "suggested plugins" are "installed" in Jenkins.

Issue Tracker

Current features

Configuration

Basic configuration of testing task

  1. Configure your project
  2. Select: Build -> Add build step -> execute shell/Execute Windows batch command
  3. Add the command to run the tests. You might have direct pybot/jybot command here like "pybot --variable name:value --outputdir my_robot_results my_test_suite" or in case you need to do something more, you can call any script that you use for running the tests. Relevant part from Robot Jenkins Plugin point of view is that this script generates the Robot outputs.
  4. Force your Robot script to return successfully from shell with "exit 0" to empower the plugin in deciding if the build is success/failure (by default Robot exits with error code when there's any failed tests)
  5. Select: Post-build Actions -> Publish Robot Framework test results
  6. Set path where your results are located (in above example command "my_robot_results")
  7. If your output files are named differently than default (i.e. output.xml, report.html and log.html) specify the filenames by pressing the "Advanced..." button and writing the names in relevant fields. The fields support wildcards * and ?.
  8. If you have other artifacts such as screenshots that you want to persist for viewing later in the logs you must configure them under "Advanced... -> Other files to copy". The field accepts comma separated list of files and supports wildcards * and ?.
  9. Set thresholds and optionally disable thresholds for critical tests only to count every test in the pass percentage.

Configuring direct links to log files

Version 1.3.0

Links are automatically generated to whatever files are configured to "Report html" and "Log html" in the plugin configuration. Links to log and report htmls are now only in the summary sections in the middle of the page and the sidebar link from previous versions have been removed.

Version 1.2.3 and earlier

From version 1.2 it's possible to configure a direct link from both sidepanel and project/build page summaries to chosen file persisted with the build. If no file is configured the link won't show up. Steps to do this are as follows:

  1. Go to project configuration
  2. Configure the name of the file to be linked to Log/Report link field
  3. Make sure that you are saving the actual file you want to link with the build by checking the filenames/masks configured in the fields behind "Advanced..." button. By default these are output.xml, report.html and log.html which are the Robot Framework default names
  4. Save the configuration and run a build. The links are persisted per build in order to withstand changes in file naming. Thus the links won't appear in builds that exist already.
  5. Links should appear in the project/build summaries and in build sidepanel.

NOTE: After configuration change etc. the link will appear also in project sidepanel, but for now it doesn't appear there right after the build. Conversely, the project view sidepanel link won't go away until after configuration change/resave in project. We're working on a solution to this.


Sidepanel link


Summary link

Configuring Robot overall pass/fail to show in the project list

  1. Go to Jenkins front page
  2. Select the + sign in the top tabs of the project listing to create a new view or go to http://YOURJENKINSHOST/newView
  3. Name your view and proceed creating a list view
  4. Choose project you want to include to the view. By default the "Robot pass/fail" column will appear to the column listing.
  5. Save view and select it from the top tabs in Jenkins project listing
  6. (Optional) If you want to have the view on by default go to "Manage Jenkins"->"Configure System" (or http://YOURJENKINSHOST/configure )and select your newly created view to be the default one.


List view column in action

Using token macros in e-mail report

Prerequisites: token-macro plugin and email-ext plugin installed.

  1. Go to project configuration
  2. Enable "Editable Email Notification" in post-build actions (configuration reference)
  3. Now you can use the following Robot variables in your custom result email:

Displaying test numbers in build radiator views etc.

If the Robot plugin marks the build as failure the tests will not show up. This is because only unstable and successful builds are considered to have test results per Jenkins.

This means that in order to see the test results in other views you must set your unstable threshold so that the build never goes to failure.

Overall Screenshots

Config

Project view

Build view

Detailed build view

Bugs

List of open bugs on robot-plugin

Changelog

Release 2.0.0

Release 1.6.5

Release 1.6.4

Release 1.6.2

Release 1.6.1

Release 1.6.0

Release 1.5.0

Release 1.4.3

Release 1.4.2

Release 1.4.1

Release 1.4.0

Release 1.3.2

Release 1.3.1

Release 1.3.0

Release 1.2.3

Release 1.2.2

Release 1.2.1

Release 1.2

Release 1.1

Release 1.0