cucumber-jvm cucumber.yml and pretty html report

4,073 views
Skip to first unread message

The Trav

unread,
Feb 19, 2012, 6:30:18 PM2/19/12
to Cukes
Ok, so previously I've been used to seeing the nice cucumber html
report after test runs.

Since moving to cucumber-jvm I've been getting regular junit surefire
reports, which are perfectly functional, but not as impressive / nice
looking.

I previously achieved the pretty report by having /config/cucumber.yml
contain the line:
html_report: --format progress --format html --out=cucumber.html

However adding that in my current project makes no difference.

Is there any place I can look to figure out how that works?

David Kowis

unread,
Feb 20, 2012, 12:02:27 AM2/20/12
to cu...@googlegroups.com
On 2/19/2012 5:30 PM, The Trav wrote:
> Ok, so previously I've been used to seeing the nice cucumber html
> report after test runs.
>
> Since moving to cucumber-jvm I've been getting regular junit surefire
> reports, which are perfectly functional, but not as impressive / nice
> looking.
>
> I previously achieved the pretty report by having /config/cucumber.yml
> contain the line:
> html_report: --format progress --format html --out=cucumber.html

Yeah, it's basically the same, but you don't specify an output file,
instead you use an output directory.

In cucumber-jvm, things are using the new-ish cucumber-html[0] package,
which uses javascript to render the html report based on a report.js
output by cucumber-jvm

use "--format html --out target " if you're using maven, and you should
see an index.html, report.js and formatter.js in that directory

Hope that helps,
David

0: https://github.com/cucumber/cucumber-html

signature.asc

jojo

unread,
Feb 19, 2012, 9:16:25 PM2/19/12
to Cukes
I have same issue. Cannot figure out how to generate html report...

aslak hellesoy

unread,
Feb 20, 2012, 4:13:32 AM2/20/12
to cu...@googlegroups.com

Cucumber-JVM doesn't support config.yml. However, there is a HTML
reporter you can use. --format html --out someexistingdir

Aslak

> --
> You received this message because you are subscribed to the Google Groups "Cukes" group.
> To post to this group, send email to cu...@googlegroups.com.
> To unsubscribe from this group, send email to cukes+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/cukes?hl=en.
>

Tristan McCarthy

unread,
Feb 20, 2012, 10:29:39 AM2/20/12
to cu...@googlegroups.com
Is there currently any way to generate a HTML report when using JUnit with Cucumber-jvm?
I've seen discussions around adding an @Options annotation which would take arguments for reporting, which seems to have culminated in this issue.
The implication from what I've read is that this annotation would allow specifying the output directory, leading me to believe it's currently possible albeit not terribly customisable.

Have I got the wrong end of the stick there? Is it just a case of waiting until the @Options annotation is complete?

Yoshiki Ota

unread,
Feb 20, 2012, 3:38:23 AM2/20/12
to Cukes

aslak hellesoy

unread,
Feb 20, 2012, 11:38:42 AM2/20/12
to cu...@googlegroups.com

Yes, I'm afraid the HTML formatter won't be accessible from JUnit
until https://github.com/cucumber/cucumber-jvm/issues/160 is fixed.

Aslak

> --
> You received this message because you are subscribed to the Google Groups
> "Cukes" group.

> To view this discussion on the web visit
> https://groups.google.com/d/msg/cukes/-/u9IrMi-kSJAJ.

The Trav

unread,
Feb 20, 2012, 5:45:16 PM2/20/12
to Cukes
Sorry, I'm not getting it

> use "--format html --out target " if you're using maven, and you should
> see an index.html, report.js and formatter.js in that directory

This implies I should put those flags in config.yml? They're not
command line arguments

> Cucumber-JVM doesn't support config.yml. However, there is a HTML
> reporter you can use. --format html --out someexistingdir

This implies config.yml is not the correct place to put those
arguments but I'm not sure where they go.
I had a look and can't find anything like --format html in the source
for that example project, could you point me to the file?

> Yes, I'm afraid the HTML formatter won't be accessible from JUnit
> until https://github.com/cucumber/cucumber-jvm/issues/160 is fixed.

This implies that because I'm using the JUnit test runner (via mvn) I
can't get a pretty report? The example above (rackstack) uses JUnit
though.

I'm confused

Aslak Hellesøy

unread,
Feb 20, 2012, 6:21:01 PM2/20/12
to cu...@googlegroups.com
On Feb 20, 2012, at 22:45, The Trav <the....@gmail.com> wrote:

> Sorry, I'm not getting it
>
>> use "--format html --out target " if you're using maven, and you should
>> see an index.html, report.js and formatter.js in that directory
>
> This implies I should put those flags in config.yml? They're not
> command line arguments
>
>> Cucumber-JVM doesn't support config.yml. However, there is a HTML
>> reporter you can use. --format html --out someexistingdir
>
> This implies config.yml is not the correct place to put those
> arguments but I'm not sure where they go.
>

Uhm. On the command line?

Aslak

>> found it in https://github.com/dkowis/Cucumber-JVM-Example. Thx
> I had a look and can't find anything like --format html in the source
> for that example project, could you point me to the file?
>
>> Yes, I'm afraid the HTML formatter won't be accessible from JUnit
>> until https://github.com/cucumber/cucumber-jvm/issues/160 is fixed.
>
> This implies that because I'm using the JUnit test runner (via mvn) I
> can't get a pretty report? The example above (rackstack) uses JUnit
> though.
>
> I'm confused
>

> --
> You received this message because you are subscribed to the Google Groups "Cukes" group.

The Trav

unread,
Feb 20, 2012, 11:01:53 PM2/20/12
to Cukes
"mvn install --format html --out target"
insists that neither --format or --out are recognised options

On Feb 21, 10:21 am, Aslak Hellesøy <aslak.helle...@gmail.com> wrote:
> On Feb 20, 2012, at 22:45, The Trav <the.t...@gmail.com> wrote:
>
> > Sorry, I'm not getting it
>
> >> use "--format html --out target " if you're using maven, and you should
> >> see an index.html, report.js and formatter.js in that directory
>
> > This implies I should put those flags in config.yml?  They're not
> > command line arguments
>
> >> Cucumber-JVM doesn't support config.yml. However, there is a HTML
> >> reporter you can use. --format html --out someexistingdir
>
> > This implies config.yml is not the correct place to put those
> > arguments but I'm not sure where they go.
>
> Uhm. On the command line?
>
> Aslak
>
>
>
>
>
>
>
> >> found it inhttps://github.com/dkowis/Cucumber-JVM-Example. Thx
> > I had a look and can't find anything like --format html in the source
> > for that example project, could you point me to the file?
>
> >> Yes, I'm afraid the HTML formatter won't be accessible from JUnit
> >> untilhttps://github.com/cucumber/cucumber-jvm/issues/160is fixed.

Aslak Hellesøy

unread,
Feb 21, 2012, 2:10:31 AM2/21/12
to cu...@googlegroups.com
On Feb 21, 2012, at 4:01, The Trav <the....@gmail.com> wrote:

> "mvn install --format html --out target"
> insists that neither --format or --out are recognised options
>

See how it's done in
https://github.com/cucumber/cucumber-jvm/blob/master/examples/java-webbit-websockets-selenium/pom.xml

Aslak

Zak

unread,
Mar 20, 2012, 12:01:08 PM3/20/12
to cu...@googlegroups.com
hello The Trav,

Were you able to generate the report? if so could you please help me doing that.

I am using eclipse, java, cucumber-Jvm, I downloaded the example mentioned below but did not find anything impressive.

please do you have any steps to follow or any example that has a right POM.xml that generates this report ( i am talking about generating reports using cucumber-HTML)

Thank you.

aslak hellesoy

unread,
Mar 20, 2012, 12:19:58 PM3/20/12
to cu...@googlegroups.com
On Tue, Mar 20, 2012 at 4:01 PM, Zak <zak.b...@gmail.com> wrote:
> hello The Trav,
>
> Were you able to generate the report? if so could you please help me doing
> that.
>
> I am using eclipse, java, cucumber-Jvm, I downloaded the example mentioned
> below but did not find anything impressive.
>
> please do you have any steps to follow or any example that has a right
> POM.xml that generates this report ( i am talking about generating reports
> using cucumber-HTML)
>

Here is an example of how you can generate the HTML report:

https://github.com/cucumber/cucumber-jvm/blob/master/examples/java-webbit-websockets-selenium/src/test/java/cucumber/examples/java/websockets/RunCukesTest.java

You don't need anything special in your pom - as far as maven is
concerned it's just regular junit.

HTH,
Aslak

> Thank you.
>
>
> Le dimanche 19 février 2012 18:30:18 UTC-5, The Trav a écrit :
>>
>> Ok, so previously I've been used to seeing the nice cucumber html
>> report after test runs.
>>
>> Since moving to cucumber-jvm I've been getting regular junit surefire
>> reports, which are perfectly functional, but not as impressive / nice
>> looking.
>>
>> I previously achieved the pretty report by having /config/cucumber.yml
>> contain the line:
>> html_report: --format progress --format html --out=cucumber.html
>>
>> However adding that in my current project makes no difference.
>>
>> Is there any place I can look to figure out how that works?
>

> --
> You received this message because you are subscribed to the Google Groups
> "Cukes" group.

> To view this discussion on the web visit

> https://groups.google.com/d/msg/cukes/-/dFxwelk-IXEJ.

Алексей Панащенко

unread,
Jul 25, 2013, 10:45:46 AM7/25/13
to cu...@googlegroups.com
I try create cucumber.json for report in cucumber-jvm 1.3, but file didn't generate( I try https://github.com/cucumber/cucumber-jvm/blob/master/examples/java-webbit-websockets-selenium/src/test/java/cucumber/examples/java/websockets/RunCukesTest.java
but it's doesn't work for me. Can anybody give some hitns how i can create this file for reporting?

вторник, 20 марта 2012 г., 18:19:58 UTC+2 пользователь Aslak Hellesøy написал:

Paolo Ambrosio

unread,
Jul 25, 2013, 5:37:43 PM7/25/13
to cu...@googlegroups.com


On 25 Jul 2013 15:59, "Алексей Панащенко" <panashc...@gmail.com> wrote:
>
> I try create cucumber.json for report in cucumber-jvm 1.3, but file didn't generate( I try https://github.com/cucumber/cucumber-jvm/blob/master/examples/java-webbit-websockets-selenium/src/test/java/cucumber/examples/java/websockets/RunCukesTest.java
> but it's doesn't work for me. Can anybody give some hitns how i can create this file for reporting?

Your question does not seem to be related to the thread you are replying to (breaking rule 3 of this group) and you are top posting (breaking rule 2). Please read the group rules and start a new thread.

Paolo

> --
> -- Rules --
>  
> 1) Please prefix the subject with [Ruby], [JVM] or [JS].
> 2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
> 3) If you have a question, don't reply to an existing message. Start a new topic instead.
>  
> You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...@googlegroups.com. To unsubscribe from this group, send email to cukes+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
> ---

> You received this message because you are subscribed to the Google Groups "Cukes" group.

> To unsubscribe from this group and stop receiving emails from it, send an email to cukes+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

Reply all
Reply to author
Forward
0 new messages