BehatHtmlFormatterPlugin
BehatHtmlFormatterPlugin copied to clipboard
Documentation in the README for screenshots is wrong
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.