JUnit4Provider.invoke errors using Serenity 1.1.27 and 1.1.28

1,493 views
Skip to first unread message

Mircea Cocosila

unread,
Mar 2, 2016, 3:16:23 PM3/2/16
to Serenity BDD Users Group
Hi,

Today I gave the latest Serenity (1.1.28) a spin. I got lots of errors like:

Tests in error:
  JUnit4Provider.invoke:161->executeTestSet:238->executeWithRerun:274->execute:367 » Runtime
  JUnit4Provider.invoke:161->executeTestSet:238->executeWithRerun:274->execute:367 » Runtime
  JUnit4Provider.invoke:161->executeTestSet:238->executeWithRerun:274->execute:367 » Runtime
  JUnit4Provider.invoke:161->executeTestSet:238->executeWithRerun:274->execute:367 » Runtime

Then I downgraded to 1.1.27. Same kind of errors as above.

Then I reverted to 1.1.26  - the one that I have used previously and which has worked fine.

Any idea why the errors above?

P.S. I use Serenity with JUnit and Rest-Assured integration with jdk 8 (1.8.0_66) on Windows 7.

Best regards,
mircea

John Smart

unread,
Mar 2, 2016, 3:24:35 PM3/2/16
to Mircea Cocosila, Serenity BDD Users Group
Hi Mircea,

Could you post the entire stack trace?

Thanks

John 

Sent from my iPhone
--
You received this message because you are subscribed to the Google Groups "Serenity BDD Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thucydides-use...@googlegroups.com.
To post to this group, send email to thucydid...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mircea Cocosila

unread,
Mar 2, 2016, 5:05:54 PM3/2/16
to John Smart, Serenity BDD Users Group
Hi John,

In order to give you the full stack trace, I've run the tests using "mvn clean verify -X". Then I noticed the following in the stack trace:
Caused by: java.nio.file.FileSystemException:
target\site\serenity\SERENITY-JUNIT-d6e5f6f6c1521a91426806577104e530185c8126c9623f6f659afa03df6bd81a.xml6b9aa458-1428-48e5-bf51-4a402428001b -> target\site\serenity\SERENITY-JUNIT-d6e5f6f6c1521a91426806577104e530185c8126c9623f6f659afa03df6bd81a.xml: The process cannot access the file because it is being used by another process.

Then immediately I checked the running processes. Did not notice anything wrong but to be sure I restarted my system. Then I open only a terminal window to run the tests. Same error as before. Full stack trace below:

java.lang.RuntimeException: Report generation failure
        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)
Caused by: java.nio.file.FileSystemException:
target\site\serenity\SERENITY-JUNIT-d6e5f6f6c1521a91426806577104e530185c8126c9623f6f659afa03df6bd81a.xml6b9aa458-1428-48e5-bf51-4a402428001b -> target\site\serenity\SERENITY-JUNIT-d6e5f6f6c1521a91426806577104e530185c8126c9623f6f659afa03df6bd81a.xml: The process cannot access the file because it is being used by another process.

        at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:367)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:274)
        at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
        at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:161)
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.19.1:verify (default) on project omnicare-api-junit-tests: There are test failures.

...

Please refer to C:\data\omnicare\server\functional-tests\serenitybdd\omnicare-api-test\omnicare-api-junit-tests\target\failsafe-reports for the individual test
results.
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
        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.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)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.

Please refer to C:\data\omnicare\server\functional-tests\serenitybdd\omnicare-api-test\omnicare-api-junit-tests\target\failsafe-reports for the individual test
results.
        at org.apache.maven.plugin.surefire.SurefireHelper.reportExecution(SurefireHelper.java:91)
        at org.apache.maven.plugin.failsafe.VerifyMojo.execute(VerifyMojo.java:202)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        ... 20 more

Best regards,
mircea

Mircea Cocosila

unread,
Mar 3, 2016, 10:14:22 AM3/3/16
to Serenity BDD Users Group, john....@wakaleo.com
Hi John,

As you suggested, I tested using Serenity 1.1.29-rc.1 and it works fine. No more errors as I reported in my previous post regarding 1.1.28.

Thanks a lot,
mircea
Reply all
Reply to author
Forward
0 new messages