cucumber-html-reporter

Feature tests

0.3.0

Fri Nov 18 2016 22:59:01 GMT-0500 (EST)



Feature: Happy HTML reporting

In order to review cucumber reports
Fred, a cucumber user
Wants to have cucumber reports in HTML


Scenario: Fred wants to see passing scenarios in the HTML report

Before Success

Before Success + Show Info

Tests INFO will print here.
To attach INFO to Any steps, use scenario.attach function in your step definitions as shown below.

If you pass HTML's to scenario.attach then reporter will format accordingly

Simple String : scenario.attach('sample data')
Pretty JSON : scenario.attach(JSON.stringify(json, null, 2))
HTML Link : scenario.attach('format the link with html-a tag'

When this feature runs with background Success

Given Fred runs a passing cucumber scenario Success

When he provides cucumber JSON file to reporter Success

Then cucumber-html-reporter should create HTML report Success

After Success

Scenario: Fred runs scenario outline for John and print on HTML report

Before Success

When this feature runs with background Success

Given Fred runs a passing cucumber scenario on behalf of "John" Success

When he provides cucumber JSON file to reporter Success

Then cucumber-html-reporter should create HTML report Success

Scenario: Fred runs scenario outline for Bob and print on HTML report

Before Success

When this feature runs with background Success

Given Fred runs a passing cucumber scenario on behalf of "Bob" Success

When he provides cucumber JSON file to reporter Success

Then cucumber-html-reporter should create HTML report Success

Scenario: Fred wants to print test data in the HTML reports for debugging purpose

Before Success

When this feature runs with background Success

Given Fred attaches the "test data to be printed" to the Given step of passing cucumber scenario Success + Show Info

test data to be printed
{ "name": "cucumber-html-reporter", "format": "html" }

When he provides cucumber JSON file to reporter Success

Then cucumber-html-reporter should create HTML report with test-data Success

Scenario: Fred wants see the long doc string attached in the HTML report

Before Success

When this feature runs with background Success

Given Fred runs a passing cucumber scenario with the below content Success

When he provides cucumber JSON file to reporter Success

Then cucumber-html-reporter should create HTML report Success

Scenario: Fred wants to use data table and print on HTML report

Before Success

When this feature runs with background Success

Given Fred runs a passing scenario for the following data set Success

When he provides cucumber JSON file to reporter Success

Then cucumber-html-reporter should create HTML report with data-table Success



Feature: Unhappy HTML reporting


Scenario: Fred wants to see a Screenshot attached to the HTML report Failed

Before Success

Given Fred runs a failing cucumber scenario Success

When he provides cucumber JSON file to reporter Success

And a failing scenario captures a screenshot Failed Screenshot -

Oops, Page not found

Then cucumber-html-reporter should create HTML report with Screenshot Skipped

Scenario: Fred wants to see if steps are pending in the HTML report Skipped

Before Success

Given Fred runs a cucumber scenario Success

When he left this step as a pending undefined

Then cucumber-html-reporter should report pending step with code-snippets in HTML report Skipped

Scenario: Fred wants to see if steps are undefined on the HTML report Skipped

Before Success

Given Fred runs a cucumber scenario Success

When he left this step as a undefined undefined

Then cucumber-html-reporter should create undefined step in HTML report undefined

Scenario: Fred wants to see if steps are skipped on the HTML report Skipped

Before Success

Given Fred runs a cucumber scenario Success

When he throws the pending exception from this step undefined

Then cucumber-html-reporter should create HTML report with skipped and pending steps Skipped