Selenium 4 absolute beginners - Maven POM file explanation with Sample POM file


Sample POM file


<project xmlns="http://maven.apache.org/POM/4.0.0"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
       <modelVersion>4.0.0</modelVersion>
       <groupId>com.Company.ProductNameAutomation</groupId>
       <artifactId>ProductNameAutomation</artifactId>
       <version>0.0.1-SNAPSHOT</version>
       <properties>
              <jre.level>1.8</jre.level>
              <jdk.level>1.8</jdk.level>
       </properties>


       <dependencies>
              <!-- https://mvnrepository.com/artifact/org.testng/testng -->
              <dependency>
                     <groupId>org.testng</groupId>
                     <artifactId>testng</artifactId>
                     <version>6.14.2</version>
                     <scope>test</scope>
              </dependency>

              <!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
              <dependency>
                     <groupId>org.seleniumhq.selenium</groupId>
                     <artifactId>selenium-java</artifactId>
                     <version>3.14.0</version>
              </dependency>
              <!-- <dependency> <groupId>your-testng-listener-artifact-groupid</groupId> 
                     <artifactId>your-testng-listener-artifact-artifactid</artifactId> <version>your-testng-listener-artifact-version</version> 
                     <scope>test</scope> </dependency> -->


       </dependencies>


       <build>
              <!-- maven-compiler-plugin -->

              <plugins>
                     <plugin>
                           <groupId>org.apache.maven.plugins</groupId>
                           <artifactId>maven-compiler-plugin</artifactId>
                           <version>3.8.0</version>
                           <configuration>

                                  <!-- or whatever version you use -->
                                  <source>${jdk.level}</source>
                                  <target>${jdk.level}</target>
                           </configuration>

                     </plugin>

                     <!-- maven-surefire-plugin -->

                     <plugin>
                           <groupId>org.apache.maven.plugins</groupId>
                           <artifactId>maven-surefire-plugin</artifactId>
                           <version>2.22.0</version>

                           <configuration>
                                  <source>1.8</source>
                                  <target>1.8</target>
                                  <!-- Calling TestNg XML file to be executed -->
                                  <suiteXmlFiles>
                                         <file>C:\Softwares\Workspace\ProductNameAutomation\testng.xml</file>
                                  </suiteXmlFiles>

                           </configuration>

                           <!-- <properties> -->
                           <!-- <property> -->
                           <!-- <name>suitethreadpoolsize</name> -->
                           <!-- <value>2</value> -->
                           <!-- </property> -->
                           <!-- </properties> -->


                           <!-- <properties> -->
                           <!-- <property> -->
                           <!-- <name>usedefaultlisteners</name> -->
                           <!-- <value>false</value> -->

                           <!-- </property> -->
                           <!-- <property> -->
                           <!-- <name>listener</name> -->
                           <!-- <value>com.mycompany.MyResultListener,com.mycompany.MyAnnotationTransformer,com.mycompany.MyMethodInterceptor</value> -->
                           <!-- </property> -->
                           <!-- <property> -->
                           <!-- <name>reporter</name> -->
                           <!-- <value>listenReport.Reporter</value> -->
                           <!-- </property> -->
                           <!-- </properties> -->


                     </plugin>

              </plugins>
       </build>

</project>

Comments

Popular posts from this blog

QA's approach 2 Java - Understanding Static context

Selenium 4 absolute beginners - How to create Batch execution file

Technologies - Log4J - Create Log4j Configuration File - Where ? How ? What ?