selenium-java icon indicating copy to clipboard operation
selenium-java copied to clipboard

Pulling down the solution and running `mvn test` doesn't seem to work

Open nadvolod opened this issue 4 years ago • 3 comments

Multiple people are saying that if they simply pull down the solution and run 'mvn test' that it fails. Can we check if this is true? It's probably missing a plugin in the POM.xml... if so, can we add it so that it works?

nadvolod avatar May 13 '21 14:05 nadvolod

Hi @nadvolod @andreea-qa It's true, coz I m still having such issue. Simply pull the project and run mvn test — and as a result "test failed". Hope you can handle this as I cant go through the next steps on your video here See output below FYI:

`PS D:\Downloads\selenium-java> mvn test

[INFO] Scanning for projects...

[INFO]

[INFO] --------------------< org.ultimateqa:selenium.java >-------------------- [INFO] Building selenium.java 1.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ selenium.java --- [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory D:\Downloads\selenium-java\src\main\resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ selenium.java --- [INFO] No sources to compile [INFO] [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ selenium.java --- [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! [INFO] skip non existing resourceDirectory D:\Downloads\selenium-java\src\test\resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ selenium.java --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] --- maven-surefire-plugin:3.0.0-M4:test (default-test) @ selenium.java --- [INFO] [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running TestSuite [ERROR] org.testng.xml.XmlSuite.setParallel(Ljava/lang/String;)V [INFO] [INFO] Results: [INFO] [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.673 s [INFO] Finished at: 2022-04-02T22:00:14+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M4:test (default-test) on project selenium.java: There are test failures. [ERROR] [ERROR] Please refer to D:\Downloads\selenium-java\target\surefire-reports for the individual test results. [ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream. [ERROR] There was an error in the forked processorg.testng.xml.XmlSuite.setParallel(Ljava/lang/String;)V [ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked processorg.testng.xml.XmlSuite.setParallel(Ljava/lang/String;)V [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:675) [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:285) [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:248) [ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1217) [ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1063) [ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:889) [ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156) [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148) [ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117) [ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81) [ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56) [ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) [ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305) [ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192) [ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105) [ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:972) [ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:293) [ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:196) [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:566) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406) [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347) [ERROR] [ERROR] -> [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/MojoExecutionException PS D:\Downloads\selenium-java> `

VladyslavBondyk avatar Apr 02 '22 20:04 VladyslavBondyk

Alright. I resolved it. Just change the version of webdrivermanager and maven-compiler-plugin to the latest one in the pom.xml file. debugging + test is successfully done.

VladyslavBondyk avatar Apr 02 '22 20:04 VladyslavBondyk

@VladyslavBondyk appreciate your feedback! Can you share the code that you added to the POM.xml to fix it?

nadvolod avatar Jun 04 '22 16:06 nadvolod