How could I integrate Selenium with Jenkins?

0 votes

How could I integrate Selenium with Jenkins?

Dec 18, 2018 in Jenkins by Ali
• 10,440 points

recategorized Dec 18, 2018 by Ali 233 views

2 answers to this question.

+2 votes
Best answer

Hey @Ali, follow these steps to integrate selenium with jenkins

Assumption- Already have jenkins installed and running and java path is explicitly added.

Follow these steps to execute selenium built using jenkins:

  • Create a batch file save it where your jenkins.war is saved
  • Create a new build in jenkins as freestyle
  • Go to Advanced Project -> check Use Custom Workspace -> Inset the location of your project directory
  • Go to Manage Jenkins -> Configure system -> Build
  • Select Execute Windows Batch command -> under command, add the name of the batch file you've created -> Save and Apply
  • Finally, run your build and check the console output.
answered Dec 20, 2018 by Eric

selected Sep 19 by Abha
+1 vote

Hey All, you can use following steps to integrate selenium with jenkins. You first need to build a project in Jenkins using Ant or Maven:

1. Create a new job in Jenkins by clicking New Item.

2. Select Maven project in the option. If Maven project option is not available then you need to install maven plugin and then follow these steps.

3. Give a name to the job and click OK.

4. Now go to manage jenkins and then configure system. Here make sure you have JDK installed and correct JAVA_HOME.

5. Now go to the build section of the new job. In the root POM enter the path to your pom.xml file. In the goals and options enter clean install or clean test or whatever maven commands that you wish to execute. Then click on apply.

6. Now go to your project page and click on build now option. now maven will build the project and testng will run the test cases. Once the build process is done, you can click on the project on the jenkins dashboard. You can now see the result of your project.You can also the output in the console output option.

answered Sep 19 by Abha
• 27,180 points

Related Questions In Jenkins

0 votes
3 answers

How can I make Jenkins CI with Git trigger on pushes to master?

To automatically run build on code commit, follow ...READ MORE

answered Aug 7 in Jenkins by Sirajul
• 40,980 points
320 views
0 votes
1 answer

How to run selenium script with TestNG on Jenkins?

You can build this project in Jenkins ...READ MORE

answered Jun 19 in Jenkins by Neel
• 3,010 points
140 views
0 votes
1 answer

How can I create global macros and templates in jenkins job builder?

you can append the path to the ...READ MORE

answered Apr 2, 2018 in Jenkins by ajs3033
• 7,280 points
367 views
0 votes
1 answer

any way to integrate Jenkins with ServiceNow?

Now, there is no official servicenow support ...READ MORE

answered Apr 10, 2018 in Jenkins by DareDev
• 6,810 points
1,370 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
242 views
0 votes
1 answer
0 votes
1 answer

How do I start jenkins on my Virtual Machine?

To start the Jenkins server please follow ...READ MORE

answered Dec 17, 2018 in Jenkins by Arohi
749 views
+5 votes
4 answers

How can I run a Jenkinsfile from a particular folder?

Consider the below points: The Freestyle project ...READ MORE

answered Mar 26, 2018 in Jenkins by anonymous
4,980 views