Skip to content
Create Pretty Cucumber Reports on the Fly locally during development
Pull request Compare This branch is 33 commits behind damianszczepanik:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
src/main
.gitignore
.travis.yml
README.md
cucumber-sandwich.bat
cucumber-sandwich.iml
cucumber-sandwich.jar
pom.xml

README.md

Generate Pretty HTML Reports For Cucumber On The Fly

This project generates pretty cucumber html reports on the fly. It monitors your cucumber json report directory for change and then publishes a new report if your report json files change.

Background

I wanted a way of quickly seeing my cucumber reports results when running locally where we didn't have maven available so the maven mojo could not be used.

Install

  1. download this project
  2. mvn clean install
  3. mvn package

You should see a file like this: cucumber-sandwich-0.0.1-SNAPSHOT-jar-with-dependencies.jar rename this file to cucumber-sandwich.jar

Use

Use the cucumber-sandwich.jar like this:

java -jar cucumber-sandwich.jar -f path/to/the/folder/containing/cucumber.json -o /path/to/generate/html/reports/into

It's probably best to stick that in a .bat or .sh script for easy running. Also note there is no checking done to verify if the json files are cucumber ones and it picks up any json files in the input directory. So make sure you generate your cucumber.json files in a directory without other json files.

You can specify where the cucumber.json goes in your runner e.g.

 import cucumber.junit.Cucumber;
 import org.junit.runner.RunWith;

 @RunWith(Cucumber.class)
 @Cucumber.Options(format = {"json:path/to/cucumber.json"})
 public class SomeTest {
 }

Develop

Interested in contributing to the cucumber-reporting? Just contact me or send a pull request.

Something went wrong with that request. Please try again.