How could I integrate Selenium with Jenkins

0 votes

How could I integrate Selenium with Jenkins?

Dec 19, 2018 in Jenkins by Ali
• 11,360 points

recategorized Dec 19, 2018 by Ali 1,187 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, 2019 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, 2019 by Abha
• 28,140 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, 2019 in Jenkins by Sirajul
• 59,230 points
4,536 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, 2019 in Jenkins by Neel
• 3,020 points
3,772 views
0 votes
1 answer

How to integrate bitbucket with Jenkins ?

You need to use the Bitbucket plugin ...READ MORE

answered Feb 11, 2020 in Jenkins by anonymous
• 59,230 points
1,049 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,300 points
1,568 views
+15 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,523 views
+2 votes
1 answer
0 votes
2 answers

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
8,050 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 27, 2018 in Jenkins by anonymous
23,697 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP