unable to run cucumber scripts in docker

102 views
Skip to first unread message

pavan kc

unread,
Jul 11, 2022, 10:52:55 AM7/11/22
to testng-users
Hi

i get below error when i execute cucumber scripts in docker with the command "docker-compose up" but when executed outside docker as "maven clean test" it works fine without any errors.
could you please help me with the same

 Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/surefire/common-java5/3.0.0-M5/common-java5-3.0.0-M5.jar (16 kB at 17 kB/s)
 [INFO]
 [INFO] -------------------------------------------------------
 [INFO]  T E S T S
 [INFO] -------------------------------------------------------
 [INFO] Running CucumberRunner
 [ERROR] An error occurred while instantiating class CucumberRunner: null
 [INFO]
 [INFO] Results:
 [INFO]
 [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
 [INFO]
 [ERROR] There are test failures.
 Please refer to /usr/src/app/target/surefire-reports for the individual test results.
 Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
 There was an error in the forked process

 An error occurred while instantiating class CucumberRunner: null
 org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process

 An error occurred while instantiating class CucumberRunner: null
  at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:733)
  at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:305)
  at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:265)
  at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1314)
  at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1159)
  at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:932)
  at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
  at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
  at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
  at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
  at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
  at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
  at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
  at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
  at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
  at org.apache.maven.cli.MavenCli.execute(MavenCli.java:954)
  at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
  at org.apache.maven.cli.MavenCli.main(MavenCli.java:192)
  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:498)
  at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
  at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)  
  at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
  at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)    

 [INFO] ------------------------------------------------------------------------  
 [INFO] BUILD SUCCESS
 [INFO] ------------------------------------------------------------------------  
 [INFO] Total time: 03:28 min
 [INFO] Finished at: 2022-07-11T13:55:19Z
 [INFO] ------------------------------------------------------------------------  
cucumber-faces_12c_selenium-tests_1 exited with code

⇜Krishnan Mahadevan⇝

unread,
Jul 11, 2022, 10:34:52 PM7/11/22
to testng-users
TestNG is merely a test runner here and has no role to play beyond running your tests.

Have you reviewed the test failures to find out what went wrong ?

 Please refer to /usr/src/app/target/surefire-reports for the individual test results.
 Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribblings @ https://rationaleemotions.com/


--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/testng-users/5d339a3f-7685-4d82-a362-fa06e74ff8e1n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages