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:
- Navigate to Jenkins Dashboard (
http://localhost:8080
by default) in the browser window. - On Jenkins Dashboard, click on the New Job link to create a CI job.
- Enter
Selenium Cookbook
in the Job name: textbox. - Select the Build a free-style software project radio button, as shown in the following screenshot:
- Click on OK.
- A new job will be created with the Selenium Cookbook name.
- On the job configuration page, go to the Source Code Management...