Selenium maven build for Continuous Integration-CI

In previous post we have discussed Maven Integration with Selenium through Eclipse , Today we will discuss integrate selenium maven build and how to create maven build for continuous integration . Check Jenkins section to know more about CI.

To create maven build we should have maven installed in our machine  so let us start setting up maven.


Note- You can check Youtube video for the which we are going to cover now


Youtube video for the same


Steps for selenium maven build creation


Module 1- Install Maven in local machine.

1- Navigate to Maven official site and download stable version of Maven.

Maven Download-

selenium maven build

integrate selenium with maven

2 –  Unzip the download file and Check unzip folder – in our case folder name- apache-maven-3.3.1


selenium maven build

integrate selenium with maven

3-  This is maven home directory and now we have to set path for the same

selenium maven build

integrate selenium with maven

4-     To set path variable- Right Click on my computer and Select property.


selenium maven build

integrate selenium with maven

5-   Now we need to set path variable also for System variable.

Note- Please do not touch other variable, Go to last point use ; and then enter path till bin folder.


selenium maven build

6-  Click on save and apply.  You can verify now that Maven is installed or not.

Open command prompt and type

7-  If Maven is installed properly then you will get Maven version and Java version on Console.

selenium maven build


Module 2- Create a maven project and create at least one test case.

Please refer below post to create Maven project  for Selenium in Eclipse.

In my case I have created 1 sample test case and created testng.xml file to execute test case.

Click on POM.xml file and make the below changes


POM.XML for Selenium maven build



My project structure after all the changes.

create POMxml file









Once all set you can execute pom.xml. Right click on pom.xml and run as maven test.

integrate selenium with maven

Now its time to enjoy because our build is success. Check below screenshot

integrate selenium with maven

Reports- You can check default reports which is created and you can see another surfire reports as well.

You can also create XSLT Reports with Maven.

integrate selenium with maven

We can also configure Maven with Jenkins and we can run our build periodically.

Hope you like above post. Please comment below if you are getting any issue.

Please share with your friends if you found this article is useful.

Keep visiting. Have a nice day 🙂

Like Facebook Page for more updates-Learn-Automation facebook page

Join Selenium Group for discussion and queries- Learn-Automation group



  1. chiranjeevi
  2. prashant
      • prashant
  3. Aadesh Raj
  4. sheshukumar
  5. Amit
  6. Priyabrata Samal
  7. Ashwini
  8. Raghavendra
    • Raghavendra
  9. sudhr