Reputation: 105
In my work location, we are creating automated web application tests using selenium web driver. Now we want to integrate it with Jenkins continuous integration tool to run the tests automatically when a new build is pushed to the server. How to do this implementation?
Upvotes: 2
Views: 144
Reputation: 26
Create a Maven pom.xml
file in a new project directory that includes
all the dependencies you need to get the project going.
From the command-line, run mvn clean install
to download the
dependencies.
Install PhantomJS from phantomjs.org/download.html
. Make sure
phantomjs is accessible from the command line.
If you have not done so yet, create a test.
Run the test. At the prompt, type: mvn test The test will run using
PhantomJS and output the results to target/surefire-reports
in a
JUnit XML format that is understood by Jenkins.
Make sure PhantomJS is installed on all the Jenkins Nodes that will run the tests.
Create a new Jenkins job and set it to run after a build is deployed.
Save the job, run it and view the test results.
Upvotes: 1