cucumber-html-report
v0.6.5
Published
Convert cucumber json reports to a pretty html report.
Downloads
30,466
Readme
cucumber-html-report
Create pretty HTML reports from cucumber json report files. Uses mustache templates to transform json to HTML. Also writes embeddings (base64 encoded PNG images) to disk and includes them in the HTML, useful for showing screenshots from Protractor for example. Plain text embeddings are also included in the HTML, useful for including additional information such as environment details and values of any randomly generated data.
New Promise-based API
const report = require('cucumber-html-report');
report.create({
source: './cucumber_report.json', // source json
dest: './reports', // target directory (will create if not exists)
name: 'report.html', // report file name (will be index.html if not exists)
template: 'mytemplate.html', // your custom mustache template (uses default if not specified)
partialsDir: './partials', // your custom mustache partials directory (uses default if no custom template is specified, or empty when there is template but no partials)
title: 'Cucumber Report', // Title for default template. (default is Cucumber Report)
component: 'My Component', // Subtitle for default template. (default is empty)
logo: './logos/cucumber-logo.svg', // Path to the displayed logo.
screenshots: './screenshots', // Path to the directory of screenshots. Optional.
dateformat: 'YYYY MM DD', // default is YYYY-MM-DD hh:mm:ss
maxScreenshots: 10 // Max number of screenshots to save (default is 1000)
})
.then(console.log)
.catch(console.error);
Goals
Keep it simple, lightweight, robust and tested. Keep dependencies to a bare minimum. Cover most common usecases...
Contribute
Contributions are always welcome. Just submit a Pull Request.
Author
Written by Peter Leinonen 2016, with help of contributors. Thanks!