When I run a test with Sikuli Screen class on a local machine or from a local machine into a remote server, the test runs without error, but when I run the same test from CI (TeamCity), I get this error:
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on project myProject: There are test failures.
[ERROR]
[ERROR] Please refer to /root/work/myProject/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 process
[ERROR]
[ERROR] Cannot instantiate class com.bme.test.SikuliExampleTest
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
[ERROR]
[ERROR] Cannot instantiate class com.bme.test.SikuliExampleTest
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:733)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:305)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:265)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1314)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1159)
[ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:932)
[ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPlu[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:957)
[ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
[ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
[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)
Other tests run from TeamCity also work without errors.
POM:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
</plugin>
When I run a test with Sikuli Screen class on a local machine or from a local machine into a remote server, the test runs without error, but when I run the same test from CI (TeamCity), I get this error:
Failed to execute goal org.apache. maven.plugins: maven-surefire- plugin: 3.0.0-M5: test (default-test) on project myProject: There are test failures. myProject/ target/ surefire- reports for the individual test results. jvmRun[ N].dump and [date].dumpstream. test.SikuliExam pleTest maven.surefire. booter. SurefireBooterF orkException: There was an error in the forked process test.SikuliExam pleTest maven.plugin. surefire. booterclient. ForkStarter. fork(ForkStarte r.java: 733) maven.plugin. surefire. booterclient. ForkStarter. run(ForkStarter .java:305) maven.plugin. surefire. booterclient. ForkStarter. run(ForkStarter .java:265) maven.plugin. surefire. AbstractSurefir eMojo.executePr ovider( AbstractSurefir eMojo.java: 1314) maven.plugin. surefire. AbstractSurefir eMojo.executeAf terPrecondition sChecked( AbstractSurefir eMojo.java: 1159) maven.plugin. surefire. AbstractSurefir eMojo.execute( AbstractSurefir eMojo.java: 932) maven.plugin. DefaultBuildPlu ginManager. executeMojo( DefaultBuildPlu [ERROR] at org.apache. maven.lifecycle .internal. MojoExecutor. execute( MojoExecutor. java:210) maven.lifecycle .internal. MojoExecutor. execute( MojoExecutor. java:156) maven.lifecycle .internal. MojoExecutor. execute( MojoExecutor. java:148) maven.lifecycle .internal. LifecycleModule Builder. buildProject( LifecycleModule Builder. java:117) maven.lifecycle .internal. LifecycleModule Builder. buildProject( LifecycleModule Builder. java:81) maven.lifecycle .internal. builder. singlethreaded. SingleThreadedB uilder. build(SingleThr eadedBuilder. java:56) maven.lifecycle .internal. LifecycleStarte r.execute( LifecycleStarte r.java: 128) maven.DefaultMa ven.doExecute( DefaultMaven. java:305) maven.DefaultMa ven.doExecute( DefaultMaven. java:192) maven.DefaultMa ven.execute( DefaultMaven. java:105) maven.cli. MavenCli. execute( MavenCli. java:957) maven.cli. MavenCli. doMain( MavenCli. java:289) maven.cli. MavenCli. main(MavenCli. java:193) jdk.internal. reflect. NativeMethodAcc essorImpl. invoke0( Native Method) jdk.internal. reflect. NativeMethodAcc essorImpl. invoke( NativeMethodAcc essorImpl. java:62) jdk.internal. reflect. DelegatingMetho dAccessorImpl. invoke( DelegatingMetho dAccessorImpl. java:43) java.lang. reflect. Method. invoke( Method. java:566) plexus. classworlds. launcher. Launcher. launchEnhanced( Launcher. java:282) plexus. classworlds. launcher. Launcher. launch( Launcher. java:225) plexus. classworlds. launcher. Launcher. mainWithExitCod e(Launcher. java:406) plexus. classworlds. launcher. Launcher. main(Launcher. java:347)
[ERROR]
[ERROR] Please refer to /root/work/
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-
[ERROR] There was an error in the forked process
[ERROR]
[ERROR] Cannot instantiate class com.bme.
[ERROR] org.apache.
[ERROR]
[ERROR] Cannot instantiate class com.bme.
[ERROR] at org.apache.
[ERROR] at org.apache.
[ERROR] at org.apache.
[ERROR] at org.apache.
[ERROR] at org.apache.
[ERROR] at org.apache.
[ERROR] at org.apache.
[ERROR] at org.apache.
[ERROR] at org.apache.
[ERROR] at org.apache.
[ERROR] at org.apache.
[ERROR] at org.apache.
[ERROR] at org.apache.
[ERROR] at org.apache.
[ERROR] at org.apache.
[ERROR] at org.apache.
[ERROR] at org.apache.
[ERROR] at org.apache.
[ERROR] at org.apache.
[ERROR] at java.base/
[ERROR] at java.base/
[ERROR] at java.base/
[ERROR] at java.base/
[ERROR] at org.codehaus.
[ERROR] at org.codehaus.
[ERROR] at org.codehaus.
[ERROR] at org.codehaus.
Other tests run from TeamCity also work without errors. org.apache. maven.plugins< /groupId> d>maven- surefire- plugin< /artifactId> 3.0.0-M5< /version>
POM:
<plugin>
<groupId>
<artifactI
<version>
</plugin>
<dependency>
<groupId> com.sikulix< /groupId>
<artifactId> sikulixapi< /artifactId>
<version> 2.0.4</ version>
</dependency>