Using Jenkins and Ant for Selenium WebDriver test execution in continuous integration

Ant can also be configured to run tests in continuous integration with Jenkins. In this recipe, we will set up Jenkins to run tests with Ant.

Getting ready

Running tests with Jenkins and Ant needs both the tools installed on the machine. Refer to the Using Ant for Selenium WebDriver test execution and Configuring Jenkins for continuous integration recipes to install and configure Ant and Jenkins respectively.

How to do it...

Let's configure Jenkins and Ant to run tests in CI:

  1. Navigate to Jenkins Dashboard (http://localhost:8080 by default) in the browser window.
  2. On Jenkins Dashboard, click on the New Job link to create a CI job.
  3. Enter Selenium Cookbook in the Job name: ...

Get Selenium Testing Tools Cookbook - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.