serenity-bdd / serenity-maven-plugin

19 stars 21 forks source link

Serenity report not getting generated. #15

Closed ManasBBSR closed 8 years ago

ManasBBSR commented 8 years ago

Getting the below error message while trying to execute mvn clean aggregate: I tried using different versions of the serenity-maven-plugin but still getting the same issue.

[INFO] Scanning for projects... Downloading: http://repo.maven.apache.org/maven2/net/serenity-bdd/maven/plugins/serenity-maven-plugi n/1.1.17/serenity-maven-plugin-1.1.17.pom Downloaded: http://repo.maven.apache.org/maven2/net/serenity-bdd/maven/plugins/serenity-maven-plugin /1.1.17/serenity-maven-plugin-1.1.17.pom (4 KB at 2.7 KB/sec) [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Serenity JUnit Quick Start Project 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- serenity-maven-plugin:1.1.17:aggregate (default-cli) @ Serenity-Demo --- Merging requirements = [Requirement{name='Search on google', type='feature' parent = 'null', cardNum ber='null'}] Merging requirements = [] Merged requirements set = [Requirement{name='Search on google', type='feature' parent = 'null', card Number='null'}] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7.180s [INFO] Finished at: Tue Dec 01 13:24:53 IST 2015 [INFO] Final Memory: 17M/247M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal net.serenity-bdd.maven.plugins:serenity-maven-plugin:1.1.17:aggregate (default-cli) on project Serenity-Demo: Execution default-cli of goal net.serenity-bdd.maven.plugin s:serenity-maven-plugin:1.1.17:aggregate failed: Couldn't close the zip file: error in opening zip f ile -> [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 arti cles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

Below is the POM File I'm using:

4.0.0 net.serenity_bdd.samples.junit Serenity-Demo 0.0.1-SNAPSHOT Serenity JUnit Quick Start Project UTF-8 1.1.22-rc.10 1.1.17 firefox ``` net.serenity-bdd serenity-junit 1.1.22-rc.10 net.serenity-bdd serenity-cucumber 1.1.1 net.serenity-bdd serenity-core 1.1.22-rc.10 org.slf4j slf4j-simple 1.6.1 ``` ``` org.assertj assertj-core 1.7.0 test info.cukes cucumber-core 1.2.4 test info.cukes cucumber-java 1.2.2 test info.cukes cucumber-junit 1.2.2 test info.cukes cucumber-jvm-deps 1.0.3 test info.cukes cucumber-html 0.2.3 test info.cukes gherkin 2.12.2 test org.seleniumhq.selenium selenium-java 2.45.0 test com.sun.jersey jersey-client 1.8 org.json json 20090211 maven-failsafe-plugin 2.18 **/**Test.java ${webdriver.driver} ${surefire.rerunFailingTestsCount} ${surefire.rerunFailingTestsCount} net.serenity-bdd.maven.plugins serenity-maven-plugin ${serenity.maven.version} net.serenity-bdd serenity-core ${serenity.version} serenity-reports post-integration-test aggregate ```
YamStranger commented 8 years ago

Hello @ManasBBSR.

Thanks for this issue.

Please add some examples to reproduce this problem - for now I can't do it.

Thanks!

ManasBBSR commented 8 years ago

Hi Yaroslav,

Please find attached the sample code where I have used Serenity.

Thanks, Manas Serenity-Demo.zip

YamStranger commented 8 years ago

@ManasBBSR Thanks a lot!!!

YamStranger commented 8 years ago

Hello @ManasBBSR

Your bug is fixed and will be available in next release of serenity-core and serenty-maven-plugin

Thanks for helping us making serenity BDD better !!!

YamStranger commented 8 years ago

It seems that this issue already fixed, will close this issue

ManasBBSR commented 8 years ago

Thanks a lot Yaroslav.

Jitendra1665 commented 8 years ago

Hello , I am also getting the above issue, I would like to know the mistake where I am doing.

The Issue is -

[INFO] Total time: 13.369 s [INFO] Finished at: 2016-06-10T21:02:25+05:30 [INFO] Final Memory: 34M/426M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal net.serenity-bdd.maven.plugins:serenity-maven-plugin:1.0.47:aggregate (serenity-reports) on project SprintRunnerBolt: Execution serenity-reports of goal net.serenity-bdd.maven.plugins:serenity-maven-plugin:1.0.47:aggregate failed. NullPointerException -> [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/PluginExecutionException

Also attached my sample project - I am running the code as - mvn clean verify SprintRunnerBolt.zip

Jitendra1665 commented 8 years ago

Can any one please help me..!

wakaleo commented 8 years ago

First, you should upgrade to the latest version of Serenity. Also, you should The attached project isn't running any tests, which is why the report is empty. It is not running the tests because the failsafe plugin is not finding the tests. Once you get the failsafe plugin correctly configured, the reports should be generated correctly.

Jitendra1665 commented 8 years ago

Thanks for your response John, I actually took the latest version of serenity from the maven repository. And the code I took is from the serenity website. I didn't do any more changes other than having some more dependencies..!

I attached the code in the above comment - as a reference if need to check...! please let me know if you need any more information..!

wakaleo commented 8 years ago

After 1.0.47 the core library was renamed to serenity-core for more consistency. The latest version is on central is 1.1.36 (http://search.maven.org/#search%7Cga%7C1%7Cserenity-core).

Jitendra1665 commented 8 years ago

John, I have done the corresponding changes - still I am getting the same error..! attached the image of the results(no index.html) and also the error message screen shot.

image

I am also attaching the code I tried with. SprintRunnerBolt.zip

wakaleo commented 8 years ago

You need to update your serenity dependency from "core" to "serenity-core".

Jitendra1665 commented 8 years ago

Yes, I have done that is done already - screen shot for the same. image

wakaleo commented 8 years ago

The serenity dependency is duplicated in your pom file, make sure there is only one.

Jitendra1665 commented 8 years ago

Thanks a lot for your guidance. My script is running with out fail . but I am not getting pie charts and dependencies is telling like not run..! - Would like to know this time - what could be the reason? Also attached new code. SprintRunnerBolt.zip

image

Jitendra1665 commented 8 years ago

John, are you able to help me out?

Jitendra1665 commented 8 years ago

I am running the tests as mvn clean verify

wakaleo commented 8 years ago

The maven-failsafe-plugin is not picking up the tests. You need to ensure that this plugin is configured correctly (see http://maven.apache.org/surefire/maven-failsafe-plugin/examples/inclusion-exclusion.html)

Jitendra1665 commented 8 years ago

I tried figuring out - but not getting any clue..! I am using as follows :

this I had taken from Serenity official web site..! http://thucydides.info/docs/serenity-staging/#_building_serenity_projects_in_maven

maven-failsafe-plugin 2.18 *_/features/_.java ${webdriver.driver} ${surefire.rerunFailingTestsCount} ${surefire.rerunFailingTestsCount} net.serenity-bdd.maven.plugins serenity-maven-plugin ${serenity.maven.version} net.serenity-bdd serenity-core ${serenity.version} serenity-reports post-integration-test aggregate
Jitendra1665 commented 8 years ago

SprintRunnerBolt.zip - code is as follows

Jitendra1665 commented 8 years ago

not getting any clue where I am doing mistake..!

wakaleo commented 8 years ago

Try starting from scratch using the Serenity Maven archetype.

Jitendra1665 commented 8 years ago

ok

Jitendra1665 commented 8 years ago

tried , still getting same issue..!

wakaleo commented 8 years ago

Make sure you update the serenity version. Are any tests running?

Jitendra1665 commented 8 years ago

No - No tests are running in serenity? all the places I updated version currectly..!

Jitendra1665 commented 8 years ago

Reports are not having any pie charts becasue all tests are not running..!

Jitendra1665 commented 8 years ago

But ever time build is getting sucess

wakaleo commented 8 years ago

That would be a maven (fail safe) configuration issue. Try removing the failsafe inclusions configuration and renaming your test classes so that they end in "Test"

Jitendra1665 commented 8 years ago

I will try it tomorrow and let you know..! Thanks for your response...! I tried changing to test but not yet worked..!

jogjitu commented 8 years ago

@wakaleo I am running serenity-cucumber project and get blank results

wakaleo commented 8 years ago

If none of the tests are running at all, it is generally a Maven/Surefire configuration issue of some kind.

jogjitu commented 8 years ago

I am using gradle tests are running fine just the reports are blank

wakaleo commented 8 years ago

Can you provide a sample project that reproduces the problem?

jogjitu commented 8 years ago

automate-tests.zip

cliviu commented 8 years ago

hi @jogjitu , Thanks for uploading the project, I will take a look at your problem

cliviu commented 8 years ago

when running your project, I've noticed a problem with the gradle build regarding the xml-apis libraries. build.gradle.zip Please try again with the attached build.gradle, let me know if it works

siva90144 commented 7 years ago

I am also getting index.html as blank. it is not showing any pie chart. but i am getting individual report and test case is executing report

wakaleo commented 7 years ago

See https://github.com/serenity-bdd/serenity-core/issues/692