Maven POM Structure with testng XML to run Part 02

In my last post I have shared the common structure of POM.xml for Maven. One can refer it here first

Link https://hrwebqa.blogspot.com/2019/11/maven-pom-xml-structure.html

In this post i am sharing the POM structure where one can place the testng.xml file into the dependency plugins tag where it will run.


Maven Project structure

[Project Name]

>> pom.xml [default created by project while creating project]

Create new file e.g., shop.xml which will be testng.xml file

testng.xml file format would be like






[Put the actual testcase file name here]





pom.xml file with testng.xml


  4.0.0
  com.qatest
  ArtifactV6
  0.0.1-SNAPSHOT

 
 
    org.seleniumhq.selenium
    selenium-server
    3.141.59

 
    org.testng
    testng
    7.0.0
    test

 
 
 

 
 
 
    org.apache.maven.plugins
    maven-surefire-plugin
    3.0.0-M2
   

shop.xml [Pass the above testng.xml file name here and then it will run from here]



 
 
  org.apache.maven.plugins
   maven-compiler-plugin
   3.8.1
   
    1.8
    1.8
 
 
 
 
 





Hope it will provide some clue and insights.

Comments

Popular Posts