serenity-bdd / serenity-documentation

The main Serenity BDD documentation
Apache License 2.0
40 stars 61 forks source link

How to disable reporting #111

Closed blaltarriba closed 6 years ago

blaltarriba commented 6 years ago

Hi all,

I have a Java project and I'm using Serenity + JBehave, my pom.xml looks like:

<dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-core</artifactId>
        <version>1.2.2</version>
</dependency>
<dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-jbehave</artifactId>
        <version>1.21.0</version>
        <scope>test</scope>
</dependency>
<dependency>
        <groupId>net.serenity-bdd</groupId>
        <artifactId>serenity-junit</artifactId>
        <version>1.2.2</version>
</dependency>

This Java project will run as a AWS Lambda function to execute all BDD stories. The problem comes because when this runs tries to generate the reports with the results of stories to local folder. So, I'm looking for the way (I guess configuring in the pom.xml file) to disable reports generation but I haven't found anything related neither documentation. Any link or idea to make this?

Any help it's appreciate!

Thanks you all

wakaleo commented 6 years ago

This is not currently supported. It could be done with some conditional logic in the ReportService if you would like to propose a PR.

blaltarriba commented 6 years ago

First of all, thank you @wakaleo for your quickly answer.

As a work around I've tried to change reports output directory following: https://johnfergusonsmart.com/configuring-different-output-directories-serenity-bdd-maven/

I've added serenity.properties file like:

serenity.outputDirectory = tmp/target/site/reports

Locally runs great but in AWS Lambda I get:

Using controls EmbedderControls[batch=false,skip=false,generateViewAfterStories=true,ignoreFailureInStories=false,ignoreFailureInView=true,verboseFailures=false,verboseFiltering=false,storyTimeouts=300,threads=1,failOnStoryTimeout=false]

Generating reports view to '/var/jbehave' using formats '[stats, console, html, xml, serenityreporter, junitscenarioreporter]' and view properties '{decorateNonHtml=true}'

Failed to generate reports view to '/var/jbehave' using formats '[stats, console, html, xml, serenityreporter, junitscenarioreporter]' and view properties '{decorateNonHtml=true}'

I don't know where path 'var/jbehave' came from (maybe is a temporary path), I just set as serenity configuration the output directory with serenity.properties file. Any idea?

Thank you again!

blaltarriba commented 6 years ago

Sorry to ask about non-related topic to Serenity project. I see my question in the last comment was related to JBehave configuration.

Ragul-Dhandapani commented 3 years ago

Hi @wakaleo - I can see this issue is closed with enhancement label. Can you tell me whether this change has been merged and what is the change which i need to put to disable the Serenity Report Generation ?

wakaleo commented 3 years ago

This isn’t currently supported but you can propose a PR if it is valuable to you