Skip to content

Trogie/BehatHtmlFormatterPlugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BehatHtmlFormatterPlugin

Suggestions are more than welcome !

This is a behat 3 extension to generate HTML reports from your test results.

Add this to your behat.yml file:

formatters:
    html:
        output_path: %paths.base%/build/html/behat
  extensions:
    emuse\BehatHTMLFormatter\BehatHTMLFormatterExtension:
        name: html
        renderer: Twig,Behat2
        file_name: Index

The output parameter is relative to %paths.base% and, when omitted, will default to that same path.

The renderer is the renderer engine and the report format that you want to be generated.

The file_name is optional. When it is added, the report name will be fixed instead fo generated, and this file will be overwritten with every build.

Actually, there is 3 formats :

  • Twig : new report format based on Twig, requires Twig installed
  • Behat2 : like Behat 2 HTML report
  • Minimal : ultra minimal...

You must specify the format that you want to use in the renderer parameter.

You can combine formats to generate multiple reports with multiple formats at one time for one test suite : you just need to separate them by commas

File names have this format : "renderer name"_"date hour"

To be done:

  1. Store previous runs --> Done
  2. Add parameters for behat.yml file
  3. Add bootstrap as dependency
  4. clean up html report
  5. Add out parameter

=========================

Twig :

Behat2 :

About

This is a behat plugin to generate HTML reports

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 91.9%
  • CSS 8.1%