dutchiexl / BehatHtmlFormatterPlugin

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

Documentation in the README for screenshots is wrong #120

Open ptmkenny opened 4 years ago

ptmkenny commented 4 years ago

The README says this:

In order to embed a screenshot, you will need to take a screenshot using your favourite webdriver and store it in the following filepath format:

results/html/assets/screenshots/{{feature_name}}/{{scenario_name}}.png

But this is not correct.

In behat.yml, you need to configure it like this:

default:
  suites:
    default:
      paths:
        - "%paths.base%/features"
        - "%paths.base%/site-features"
      contexts:
        - FeatureContext
         - emuse\BehatHTMLFormatter\Context\ScreenshotContext:
           # "assets" needs to be within the reports output_path
           screenshotDir: /app/tests/reports/assets/screenshots
      formatters:
        html:
          # Where to put the HTML report
          output_path: /app/tests/reports

It seems the fix for the issue https://github.com/dutchiexl/BehatHtmlFormatterPlugin/pull/88 got committed, so the documentation should be updated.