Created
March 7, 2020 16:31
-
-
Save pragmatictesters/da18c6d6c5b7ad8b57f5db6110f91924 to your computer and use it in GitHub Desktop.
Selenium WebDriver ReportNG integration. Sample testng.xml and pom.xml files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- ................................................................. --> | |
<!-- SAMPLE pom.xml file with Selenium + TestNG + ReportNG integration --> | |
<!-- ................................................................. --> | |
<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>org.example</groupId> | |
<artifactId>test-reportng</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<dependencies> | |
<dependency> | |
<groupId>org.seleniumhq.selenium</groupId> | |
<artifactId>selenium-java</artifactId> | |
<version>3.141.59</version> | |
</dependency> | |
<dependency> | |
<groupId>org.testng</groupId> | |
<artifactId>testng</artifactId> | |
<version>7.1.0</version> | |
</dependency> | |
<dependency> | |
<groupId>org.uncommons</groupId> | |
<artifactId>reportng</artifactId> | |
<version>1.1.4</version> | |
</dependency> | |
<dependency> | |
<groupId>com.google.inject</groupId> | |
<artifactId>guice</artifactId> | |
<version>4.2.2</version> | |
</dependency> | |
</dependencies> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-surefire-plugin</artifactId> | |
<version>2.5</version> | |
<configuration> | |
<properties> | |
<property> | |
<name>usedefaultlisteners</name> | |
<value>false</value> | |
</property> | |
<property> | |
<name>listener</name> | |
<value>org.uncommons.reportng.HTMLReporter, org.uncommons.reportng.JUnitXMLReporter</value> | |
</property> | |
</properties> | |
</configuration> | |
</plugin> | |
</plugins> | |
</build> | |
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd" > | |
<!-- ................................................................. --> | |
<!-- SAMPLE testng.xml file with ReportNG integration --> | |
<!-- ................................................................. --> | |
<suite name="test-suite"> | |
<test name="test1"> | |
<classes> | |
<class name="com.pragmatic.reportng.TestNGExample1"/> | |
<class name="com.pragmatic.reportng.TestNGExample2"/> | |
<class name="com.pragmatic.reportng.TestNGExample3"/> | |
</classes> | |
</test> | |
<listeners> | |
<listener class-name="org.uncommons.reportng.HTMLReporter"/> | |
<listener class-name="org.uncommons.reportng.JUnitXMLReporter"/> | |
</listeners> | |
</suite> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment