---
title: 'Jenkins Tutorial: Selenium Testing'
description: Run Selenium tests with Jenkins. Tutorial and examples on running your
  automated selenium tests with Jenkins/Hudson.
source_url:
  html: https://testingbot.com/support/integrations/ci-cd/jenkins
  md: https://testingbot.com/support/integrations/ci-cd/jenkins/index.md
---
# Jenkins Automated Testing

Jenkins is a Java-based, open-source continuous integration (CI) system.

**We've created a Plugin for Jenkins with lots of features, more information [on this page](https://testingbot.com/support/integrations/ci-cd/jenkins-plugin)**

With Jenkins you can run your tests at the frequency you desire.  
 You could for example run your Selenium tests every hour, or after each xx commits to your version control system.

You can download Jenkins from [the official Jenkins page](https://www.jenkins.io/).

Below you will find a tutorial on how to integrate Jenkins with Selenium. We'll set up a basic example where a simple Selenium test will run on Jenkins and the TestingBot Selenium grid.   
 Once you've followed this setup, you'll be able to run your Selenium tests on our remote server.

## 1. Specify API credentials

To identify to our Selenium grid, you need to specify your API Key and Secret.

[Download credentials file](https://testingbot.com/members/download)

Download the credential file and copy it to your home directory (`~/.testingbot`) on your Jenkins machine.

## 2. Set up a new job
 ![set up a new Jenkins job](https://testingbot.com/assets/support/jenkins1-8f7d9ba01177533e125222639fb5973b4ac35e8ef80aa6d74861ae1a5189cf63.jpg)

Click the "New Job" button from the main Jenkins dashboard.

## 3. Specify job settings
 ![specify job settings](https://testingbot.com/assets/support/jenkins2-a58ad9ab74051f8533cc2dc776da5f93b0658a4ddfabdcf6d913171baa90531b.jpg)

Specify a name for the job and pick the option "Build a free-style software project" in the Jenkins configuration.

## 4. Git settings
 ![git settings](https://testingbot.com/assets/support/jenkins3-66def661d36ee2352f85e2b118012dc8218d35c3c4ae10f33893e1f94fe0d455.jpg)

Pick Git for Source Code Management and enter the repository URL for this demo:   
`https://github.com/testingbot/Jenkins-Demo.git`  
 This means Jenkins will each time fetch the latest code from our [GitHub repository](https://github.com/testingbot/Jenkins-Demo) and run the tests from that code.

## 5. Build Step
 ![build step](https://testingbot.com/assets/support/jenkins4-46aebddaca21bc719eac48cf31af25759d8ae064f0c1b9cabe779592a9104239.jpg)

In the next step we'll specify how Jenkins needs to build or test the project.

Our test project contains a `build.xml`, so we can use Ant to build the project. Pick Ant from the build menu.

 ![ant](https://testingbot.com/assets/support/jenkins5-46d311acc4904e5ed1641ad47bb50f5673e00ffb3f2afd4ff84e8ab14138025c.jpg)

The Ant target is: **test**

## 6. Publish JUnit results
 ![publish junit results](https://testingbot.com/assets/support/jenkins6-fe05a0504876a08639a9d88ee66743945d37697bea0534cd414dc0a89935b03c.jpg)

Make sure to publish the JUnit test results report to `test-reports/*.xml`

## 7. Run Jenkins job
 ![run Jenkins job](https://testingbot.com/assets/support/jenkins7-7601d596fa84f63f2ddd7ebb3a6a7d52a54eecc57941312a73e196d134c53b4c.jpg)

You are now ready to run your first Jenkins job. Click the **Build Now** button.

Results should be available in a minute.

## 8. Jenkins test results
 ![Jenkins Test Results](https://testingbot.com/assets/support/jenkins8-d66b10e0f91654c8036b89284e3ba60735631cf78d4ce5c346a19a737674ba89.jpg)

Now you can see the test results in Jenkins. The blue circle means the test was successful!   
 You can also see the status of your tests in the console output of the Jenkins job.

You will now see your test and its screenshots/video in our TestingBot.com member area.

## 9. TestingBot Integration
 ![Jenkins TestingBot integration](https://testingbot.com/assets/support/demo9-8c828e01802d1c2f871dc5ccfdd732256a0cd192a157f3240a8a4457769c9e6d.jpg)

With the TestingBot [Jenkins plugin](https://testingbot.com/support/integrations/ci-cd/jenkins-plugin) you can easily see a video/screenshots of your test from inside Jenkins.

Once the plugin is installed, it will report the test success/failures to TestingBot and embed the TestingBot test report inside your Jenkins installation.

### Looking for more help?

Have questions or need more information? Reach out via email or Slack.

[Email us](https://testingbot.com/contact/new)[Slack Join our Slack](https://join.slack.com/t/testingb0t/shared_invite/zt-3bcw9xch-jk19~6XPs_xBrsAgAedkCw)
