Better options when it comes to making screenshots in behat
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
Currently there is some code for creating a screenshot on step failure but it's not very useful as it saves the screenshot to dataroot with the name of the scenario as a subdir and feature as the name of the image file but when a step fails the error output mentions the feature file and step line so it's hard to quickly work out what screenshot is for what failure.
Changes I want to implement:
1) Get the step fail screenshot to be better named, eg have the name of the feature file path be the subdir, eg for social/
2) Create a step in BehatGeneral so that we can force a screenshot as it's own step so we can get multiple screenshots during a feature so that we can see what is happening before a failure. Because the step will be named specifically for making a screenshot we will need to allow the passing in of a variable to save the screenshot as, eg And show me a screenshot named "One", And show me a screenshot named "Two" etc.
3) For Ubuntu allow the system to open up the screenshot in image viewer without stopping behat running so that whether it's a failure screenshot or specified screenshot step we get to view the images without needing to hunt for them in the dataroot
Changed in mahara: | |
status: | In Progress → Fix Committed |
tags: | added: newfeature |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
For point 1 and 2 we have patch https:/ /reviews. mahara. org/#/c/ 11414/ //reviews. mahara. org/#/c/ 11415/
For point 3 we havehttps: