-
-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
serenity generates an empty report #1705
Comments
Here is my pom.xml UTF-8 2.0.52 2.0.52 1.9.8 ie
|
Try with JUnit 4.12 and check for dependency conflicts. |
ya i tried with 4.12 version of Junit but still the issue is there |
Can you provide a sample project that reproduces the issue? It might be related to spaces in the path name. Are there any other error messages? |
Also, make sure you are using the latest version of serenity-cucumber. |
Possibly fixed in 2.0.64 |
same happens with jbehave |
I don't have enough to go on with this. We generally don't recommend JBehave though, as there isn't much active development going on with it. |
Hey guys, Had the same issue and after a lot of trials, I found the issue to be version conflicts between libraries. I had to do a lot of debug and the last piece fell in place when running the maven build with -X, as it pointed out that it can't find a Jersey class. This is the end configuration of the plugin that got it to work:
Also, I had to manually add the following dependencies, as they we're coming in transiently:
Also, just to have the full context, I'm using serenity 2.0.91, (serenity-)cucumber4 1.0.19 and cucumber 4.2.0. |
It throws the below error- "Failed to Generate Junit XML report" and empty report is getting generated
TEST PASSED: Tc01 loan application login verification
[main] WARN net.thucydides.core.reports.junit.JUnitXMLOutcomeReporter - Failed to generate JUnit XML report
java.io.FileNotFoundException: target\site\serenity\SERENITY-JUNIT-88f707c108218cbec37911bc2ae8272433c52a528ab581a4d3151f18c7a065f1.xml (The system cannot find the path specified)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.(FileOutputStream.java:213)
at java.io.FileOutputStream.(FileOutputStream.java:162)
at net.thucydides.core.reports.junit.JUnitXMLOutcomeReporter.lambda$generateReportsFor$0(JUnitXMLOutcomeReporter.java:46)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
at java.util.HashMap$EntrySpliterator.forEachRemaining(HashMap.java:1696)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:291)
at java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:401)
at java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:734)
at java.util.stream.ForEachOps$ForEachOp.evaluateParallel(ForEachOps.java:160)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateParallel(ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:583)
at net.thucydides.core.reports.junit.JUnitXMLOutcomeReporter.generateReportsFor(JUnitXMLOutcomeReporter.java:39)
at net.thucydides.core.reports.ReportService.generateJUnitTestResults(ReportService.java:194)
at net.thucydides.core.reports.ReportService.generateReportsFor(ReportService.java:179)
at net.thucydides.core.reports.ReportService.generateReportsFor(ReportService.java:127)
at cucumber.runtime.formatter.SerenityReporter.generateReports(SerenityReporter.java:903)
at cucumber.runtime.formatter.SerenityReporter.handleTestRunFinished(SerenityReporter.java:330)
at cucumber.runtime.formatter.SerenityReporter.lambda$new$6(SerenityReporter.java:130)
at cucumber.runner.EventBus.send(EventBus.java:28)
at cucumber.api.junit.Cucumber$1.evaluate(Cucumber.java:128)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 15.349 sec <<< FAILURE! - in com.Automation.cucumber.TestRunnerClass
com.Automation.cucumber.TestRunnerClass Time elapsed: 15.225 sec <<< ERROR!
net.thucydides.core.reports.ReportGenerationFailedError: Failed to generate configuration report
at net.thucydides.core.reports.ReportService.waitForReportGenerationToFinish(ReportService.java:203)
at net.thucydides.core.reports.ReportService.generateReportsFor(ReportService.java:180)
at net.thucydides.core.reports.ReportService.generateReportsFor(ReportService.java:127)
at cucumber.runtime.formatter.SerenityReporter.generateReports(SerenityReporter.java:903)
at cucumber.runtime.formatter.SerenityReporter.handleTestRunFinished(SerenityReporter.java:330)
at cucumber.runtime.formatter.SerenityReporter.lambda$new$6(SerenityReporter.java:130)
at cucumber.runner.EventBus.send(EventBus.java:28)
at cucumber.api.junit.Cucumber$1.evaluate(Cucumber.java:128)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Caused by: java.util.concurrent.ExecutionException: net.thucydides.core.reports.ReportGenerationFailedError: Failed to generate reports using net.thucydides.core.reports.json.JSONTestOutcomeReporter@36327cec
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at net.thucydides.core.reports.ReportService.waitForReportGenerationToFinish(ReportService.java:200)
at net.thucydides.core.reports.ReportService.generateReportsFor(ReportService.java:180)
at net.thucydides.core.reports.ReportService.generateReportsFor(ReportService.java:127)
at cucumber.runtime.formatter.SerenityReporter.generateReports(SerenityReporter.java:903)
at cucumber.runtime.formatter.SerenityReporter.handleTestRunFinished(SerenityReporter.java:330)
at cucumber.runtime.formatter.SerenityReporter.lambda$new$6(SerenityReporter.java:130)
at cucumber.runner.EventBus.send(EventBus.java:28)
at cucumber.api.junit.Cucumber$1.evaluate(Cucumber.java:128)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Caused by: net.thucydides.core.reports.ReportGenerationFailedError: Failed to generate reports using net.thucydides.core.reports.json.JSONTestOutcomeReporter@36327cec
at net.thucydides.core.reports.ReportService.generateReportFor(ReportService.java:240)
at net.thucydides.core.reports.ReportService.lambda$generateReportsFor$0(ReportService.java:175)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: The system cannot find the path specified
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:1012)
at net.thucydides.core.reports.json.JSONTestOutcomeReporter.generateReportFor(JSONTestOutcomeReporter.java:55)
at net.thucydides.core.reports.ReportService.generateReportFor(ReportService.java:238)
at net.thucydides.core.reports.ReportService.lambda$generateReportsFor$0(ReportService.java:175)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Results :
Tests in error:
TestRunnerClass.com.Automation.cucumber.TestRunnerClass » ReportGenerationFailed
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent! The file encoding for reports output files should be provided by the POM property ${project.reporting.outputEncoding}.
[INFO]
[INFO] --- serenity-maven-plugin:2.0.52:aggregate (serenity-reports) @ DRFStaff ---
[INFO] current_project.base.dir: C:\Users\Naveen Automation\Automation Naveen\Automation learning
[INFO] Generating test results for 0 tests
[INFO] Loading requirements from tag providers :[net.thucydides.core.requirements.PackageRequirementsTagProvider@2e8ff687, net.thucydides.core.requirements.FileSystemRequirementsTagProvider@3268f664]
[INFO] LOADED REQUIREMENTS:
NO REQUIREMENTS FOUND
[INFO] 0 requirements loaded after 21 ms
[INFO] 0 related requirements found after 21 ms
[INFO] Generating test outcome reports: false
[INFO] Starting generating reports after 48 ms
[INFO] Configured report threads: 40
[INFO] Test results for 0 tests generated in 622 ms
[INFO]
[INFO] --- maven-failsafe-plugin:2.18.1:verify (default) @ DRFStaff ---
[INFO] Failsafe report directory: C:\Users\Naveen Automation\Automation Naveen\Automation learning\target\failsafe-reports
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent! The file encoding for reports output files should be provided by the POM property ${project.reporting.outputEncoding}.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27.358 s
[INFO] Finished at: 2019-06-13T11:00:54+10:00
[INFO] Final Memory: 47M/379M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.18.1:verify (default) on project DRFStaff: There are test failures.
[ERROR]
[ERROR] Please refer to C:\Users\L116214\Naveen Automation\Automation Naveen\Automation learning\target\failsafe-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
The text was updated successfully, but these errors were encountered: