Build/Configure

Enable Selenium and Screenshot Views

During your build, links on your sidebar will populate and allow you to interact with the test.

You can view and download screenshots for a Screenshots Test

You can view videos, snapshots, and network packet captures for Selenium Tests

Build Environment

Configure your Jenkins Project.

In Build Environment, Check the box next to CrossBrowserTesting.com

For Screenshot Tests: Pick a BrowserList and enter a URL (you must have you API credentials saved for the browserlist to populate). You can add multiple Screenshots Tests by clicking "Add a Screenshots Test"

For Selenium Tests: Add the Operating System, Browser, and Screen Resolution that you want to run a Selenium Test on. You can add multiple configurations by clicking "Add a Selenium Tests"

Optional: Check Use Local Tunnel to run tests on webpages behind your firewall. The CBT NodeJS Tunnel is embedded into the plugin and does not need to be install on the Jenkins Server.

To use a named tunnel, enter the "Tunnel Name" in the advanced section.

If you prefer not to use the embedded local tunnel and want to use the local tunnel installed on your system, you can specify the path to the local tunnel binary in the advanced section.

For CBT Credentials: Select the credentials to run the tests with.

Execute a Selenium Test

Execute a Selenium Test just as normally would with Jenkins.

For example, if you were running a script written in python on a Unix machine, within the Build section, select Add Build Step and Execute Shell (if you have the Python Plugin installed you can use it instead).

Enter the command to run your script ie. "python your_selenium_script.py"

Click Save

Click Build Now to build the project. Output from the tests will be displayed in Console Output for the build.

Pipeline Configuration

As of version 2.3, the plugin supports Jenkins Pipeline. Here's an example of a pipeline script: