Serenity serenity-maven-plugin, SerenityAdaptorMojo import usage

50 views
Skip to first unread message

Женя Вдовенко

unread,
Sep 30, 2015, 5:54:14 AM9/30/15
to Serenity BDD Users Group
Hi! I'm currently trying to adapt reports which are generated by other framework(in my case there are two of them, cucumber and jasmine) and I not sure how todo this in correct way. Inspecting serenity code I found adapter for external reports, but there are very little info about it and how use it. Can someone help with more info, or recommend some other way to achieve things i want?

here is my config how i tried to use this adapter:

<plugin>
<groupId>net.serenity-bdd.maven.plugins</groupId>
<artifactId>serenity-maven-plugin</artifactId>
<version>${serenity.version}</version>
<configuration>
<format>xunit</format>
<source>target/junit-report</source>
</configuration>
<executions>
<execution>
<id>serenity-reports</id>
<phase>post-integration-test</phase>
<goals>
<goal>import</goal>
</goals>
</execution>
</executions>
</plugin>


and error what i got:

[ERROR] Failed to execute goal net.serenity-bdd.maven.plugins:serenity-maven-plugin:1.1.13:import (serenity-reports) on project ReportingTestCucumber: Execution serenity-reports of goal net.serenity-bdd.maven.plugins:serenity-maven-plugin:1.1.13:import failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal net.serenity-bdd.maven.plugins:serenity-maven-plugin:1.1.13:import (serenity-reports) on project ReportingTestCucumber: Execution serenity-reports of goal net.serenity-bdd.maven.plugins:serenity-maven-plugin:1.1.13:import failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
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:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
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:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution serenity-reports of goal net.serenity-bdd.maven.plugins:serenity-maven-plugin:1.1.13:import failed.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 25 more
Caused by: java.lang.NullPointerException
at net.thucydides.core.reports.adaptors.xunit.DefaultXUnitAdaptor.loadOutcomesFrom(DefaultXUnitAdaptor.java:28)
at net.thucydides.core.reports.TestOutcomeAdaptorReporter.generateReports(TestOutcomeAdaptorReporter.java:46)
at net.thucydides.core.reports.TestOutcomeAdaptorReporter.generateReportsFrom(TestOutcomeAdaptorReporter.java:39)
at net.serenitybdd.maven.plugins.SerenityAdaptorMojo.execute(SerenityAdaptorMojo.java:80)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
... 26 more


Женя Вдовенко

unread,
Sep 30, 2015, 6:33:25 AM9/30/15
to Serenity BDD Users Group

I found answer, how can I use serenity reports with cucumber.

But still will be good if someone has some info about adapters for external reporters(also how register custom adapters).

Reply all
Reply to author
Forward
0 new messages