Before running selenium tests in jenkins, we need to setup eclipse with Maven, have your maven project ready and upload your code in GIT repository.
In your maven project, you will have pom.xml file.
Run test from local folder:
Launch your jenkins using "http://localhost:8080/".
Click "New Item" -> Maven Project-> Enter project name and click ok
In 'build' section, enter the path of your pom.xml file in Root POM textbox and enter "clean test" in 'Goal and options' text box and save.
Once the build is saved, click Build Now to run your test and see the results in console.
Run test from GIT repository:
Launch your jenkins using "http://localhost:8080/".
Click "New Item" -> Maven Project-> Enter project name and click ok
In 'Git Bucket' section, select "GitHub Project", enter your github project url in "Project url" textbox.
In "Source code Management" section, select Git radio button, and enter repository url and branch details.
In 'build' section, enter "pom.xml" in Root POM textbox and enter "clean test" in 'Goal and options' text box and save.
Once the build is saved, click Build Now to run your test and see the results in console.
Happy Testing!!!
Comments