dutchiexl / BehatHtmlFormatterPlugin

This is a behat plugin to generate HTML reports
MIT License
112 stars 117 forks source link

Add a way to specify the file name on the command line #128

Open ptmkenny opened 2 years ago

ptmkenny commented 2 years ago

The output directory can be set on the command line with --out /tmp/my-report-directory. However, the file name is either automatic or set in config.yml:

  extensions:
    emuse\BehatHTMLFormatter\BehatHTMLFormatterExtension:
      name: html
      renderer: Twig
      # file_name: index
      # If the file name is not set, a timestamp is used.
      print_args: true
      print_outp: true
      loop_break: true

In my setup, I use the same behat.yml to generate multiple reports (I use several behat commands to test several different tags).

However, because I can only specify an output directory on the command line, and not a file name, I have to put each test in a separate directory, which breaks the links to the screenshots. So it would be great if there was a way to specify the name for each report on the command line.