serenity-bdd/serenity-maven-plugin

Serenity/JBehave report not including story/scenario results in Maven

taelus opened this issue · 5 comments

I moved from a lone project to being a module in a multi-module project with a parent pom. Everything seems to be working and tests run correctly. The JBehave output is being generated correctly for its report. Serenity's report recognizes the directory structure and lists the features in the Requirements tab, but there are no results for actual scenario runs. I'm not getting any kind of error, it just returns:

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] --- serenity-maven-plugin:1.8.4:aggregate (serenity-reports) @ functional-autotest ---
[INFO] current_project.base.dir:
[INFO] Generating test results for 0 tests
[INFO] 14 requirements loaded after 93 ms
[INFO] 14 related requirements found after 93 ms
[INFO] Generating test outcome reports: false
[INFO] Starting generating reports: 124 ms
[INFO] Configured report threads: 40
[INFO] Test results for 0 tests generated in 2508 ms
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.854 s
[INFO] Finished at: 2018-01-24T10:42:39-07:00
[INFO] Final Memory: 40M/569M
[INFO] ------------------------------------------------------------------------

I'm sorry I don't have more to go on. I can see the tests run and pass or fail, I just don't see the output in the report.

Much obliged for any assistance.

(Editing this to delete the reference to an error that was related to SureFire when fixing it didn't resolve the issue.)

When I run it in IntelliJ, I'm seeing this error:
net.serenitybdd.core.exceptions.SerenityManagedException: org.apache.commons.codec.digest.DigestUtils.sha256Hex(Ljava/lang/String;)Ljava/lang/String; at net.serenitybdd.jbehave.runners.SerenityReportingRunner.run(SerenityReportingRunner.java:215)

On deeper investigation this appears to be a problem with TestNG. I can't find any reference to this problem for whatever reason, so I'll leave the error here in the hopes one of you lovely devs has an idea to toss out. Please and thank you.

org.testng.TestNGException: Failure in JUnit mode for class com.<company>.<team>.automation.test.TestExecutor at org.testng.junit.JUnit4TestRunner.start(JUnit4TestRunner.java:114) at org.testng.junit.JUnit4TestRunner.run(JUnit4TestRunner.java:70) at org.testng.TestRunner$1.run(TestRunner.java:570) at org.testng.TestRunner.runJUnitWorkers(TestRunner.java:717) at org.testng.TestRunner.privateRunJUnit(TestRunner.java:601) at org.testng.TestRunner.run(TestRunner.java:502) at org.testng.SuiteRunner.runTest(SuiteRunner.java:455) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415) at org.testng.SuiteRunner.run(SuiteRunner.java:364) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1187) at org.testng.TestNG.runSuitesLocally(TestNG.java:1116) at org.testng.TestNG.runSuites(TestNG.java:1028) at org.testng.TestNG.run(TestNG.java:996) at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:132) at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeSingleClass(TestNGDirectoryTestSuite.java:112) at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:99) at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:147) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121) Caused by: net.serenitybdd.core.exceptions.SerenityManagedException: org.apache.commons.codec.digest.DigestUtils.sha256Hex(Ljava/lang/String;)Ljava/lang/String; at net.serenitybdd.jbehave.runners.SerenityReportingRunner.run(SerenityReportingRunner.java:215) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at org.junit.runner.JUnitCore.run(JUnitCore.java:115) at org.testng.junit.JUnit4TestRunner.start(JUnit4TestRunner.java:82) ... 22 more

Sorry for asking this in here (can't find another way), what was the surefire error you fixed before editing? I am having this issue too

Are you trying to run Serenoty with TestNG (and JBehave?) Serenity doesn’t support TestNG.

Closed for lack of activity.