scenarioo / scenarioo-js

Scenarioo writer library to produce feature rich e2e test reports, e.g. from Protractor/WebDriverJS tests with Jasmine
http://www.scenarioo.org
MIT License
10 stars 3 forks source link

Save step on test failure #17

Closed bruderol closed 8 years ago

bruderol commented 8 years ago

the current examples do not provide the very important feature to take a screenshot on failure (and mark it as failure step).

Especially the new Fluent DSL should support this. For me this is the future DSL / API for ScenariooJS

bruderol commented 8 years ago

It seems to be more difficult than I thought.

  1. saveStep of scenarioo does not work in jasmine reporter specDone (too late, protractor commands for getting step information not working anymore)
  2. In afterEach it can be called, but it is very difficult to find out whether it is a succeeded or failed test in this situation (to store failure information on the step)
  3. therefore I had to intercept the expectation results to get informed about failures --> to set failure information on failure steps.
  4. In anyway it seems to be a good idea, to not just make one step at the end of the test, but one for every failed expectation (I will do that)
  5. still it makes sense to save a step in afterEach at least for success (not sure if it still makes sense on failure, if we allready record one for each expectation failure, but I will make this configurable)
bruderol commented 8 years ago

has been merged to branch release-2.2 - I close this issue, will be released with 2.2 and can be reviewed on the branch for release 2,2