Geting failure while we run mvn test | Selenium Forum
M
Posted on 10/01/2017
Hi,

I have updated POM file from existing POM file
Have done below command
1) mvn compile
2) MVN test
But getting failure

........................................................................................

[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.Rumaselenium.framework.datadriven:DataDrivenFramework_Nc_TestNG:jar:1
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ line 77, column 17
[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] ------------------------------------------------------------------------
[INFO] Building DataDrivenFramework_Nc_TestNG 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ DataDrivenFramework_Nc_TestNG ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\ruma\workspace\DataDrivenFramework_Nc_TestNG\src\main\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ DataDrivenFramework_Nc_TestNG ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ DataDrivenFramework_Nc_TestNG ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\ruma\workspace\DataDrivenFramework_Nc_TestNG\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ DataDrivenFramework_Nc_TestNG ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to C:\Users\ruma\workspace\DataDrivenFramework_Nc_TestNG\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ DataDrivenFramework_Nc_TestNG ---
[INFO] Surefire report directory: C:\Users\ruma\workspace\DataDrivenFramework_Nc_TestNG\target\surefire-reports

-------------------------------------------------------
T E S T S
-------------------------------------------------------
org.apache.maven.surefire.util.SurefireReflectionException: java.lang.reflect.InvocationTargetException; nested exception is java.lang.reflect.InvocationTargetException: null
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: org.apache.maven.surefire.testset.TestSetFailedException: Suite file C:\Users\ruma\workspace\DataDrivenFramework_Nc_TestNG\src\test\resources\testng.xml is not a valid file
at org.apache.maven.surefire.testng.TestNGXmlTestSuite.locateTestSets(TestNGXmlTestSuite.java:124)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:89)
... 9 more

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24.451 s
[INFO] Finished at: 2017-01-11T06:20:53+05:30
[INFO] Final Memory: 20M/204M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project DataDrivenFramework_Nc_TestNG: Execution default-test of goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test failed: The forked VM terminated without saying properly goodbye. VM crash or System.exit called ? -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException


.....................................................................................................


Note: POM file attached


Regards
Ruma

M
Replied on 11/01/2017

check this xml file there must be error in this line.

C:\Users\ruma\workspace\DataDrivenFramework_Nc_TestNG\src\test\resources\testng.xml