I'm Unable to run My test using Maven, on Clean Install from goals, .Pom and .Jar files are created to the .m2 folder, but the test is not running, can someone please help TIA.
- TestNG File
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite">
<test thread-count="5" name="Test">
<classes>
<class name="Project_Pkg_Mvn.NewTest1" />
</classes>
</test>
<!-- Test -->
</suite>
<!-- Suite -->
Pom.xml
http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 Project_Maven_Group_Test Project_Maven_Artifact_Test 0.0.1-SNAPSHOT
<properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> </properties> <dependencies> <dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>3.14.0</version> </dependency> <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>6.14.3</version> <scope>compile</scope> </dependency> <dependency> <groupId>net.sourceforge.jexcelapi</groupId> <artifactId>jxl</artifactId> <version>2.6</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-io</artifactId> <version>1.3.2</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.8</source> <target>1.8</target> </configuration> </plugin> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.5.1</version> <configuration> <fork>true</fork> <executable>C:\Program Files\Java\jdk1.8.0_121\bin\javac.exe</executable> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.22.0</version> <configuration> <suiteXmlfiles>src/test/resources/testng.xml</suiteXmlfiles> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <version>2.22.0</version> <configuration> <suiteXmlFiles> <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile> </suiteXmlFiles> </configuration> </plugin> </plugins> </build>
Console Output
[INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for Project_Maven_Group_Test:Project_Maven_Artifact_Test:jar:0.0.1-SNAPSHOT [WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-compiler-plugin @ line 50, column 12 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] --------< Project_Maven_Group_Test:Project_Maven_Artifact_Test >-------- [INFO] Building Project_Maven_Artifact_Test 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been relocated to commons-io:commons-io:jar:1.3.2 [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ Project_Maven_Artifact_Test --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 0 resource [INFO] [INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ Project_Maven_Artifact_Test --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ Project_Maven_Artifact_Test --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] [INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) @ Project_Maven_Artifact_Test --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-surefire-plugin:2.22.0:test (default-test) @ Project_Maven_Artifact_Test --- [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.701 s [INFO] Finished at: 2018-10-10T21:58:30+05:30 [INFO] ------------------------------------------------------------------------