xolvio / qualityfaster

An example project showing how to create robust and maintainable acceptance tests
262 stars 58 forks source link

Are screenshots on error only a cucumber feature? #45

Closed radixhound closed 8 years ago

radixhound commented 8 years ago

I am trying to get screenshots on error to work but our tests are strictly mocha + webdriver tests (no cucumber) Is that the reason I can't get it to work? When it errors I have no screenshots on CI and so I tried debugging by setting them up locally like this:

scrnBin = path.resolve(baseDir, 'screenshots');
if (process.env.CIRCLECI) {
  chimpSwitches += ' --screenshotsPath="' + process.env.CIRCLE_ARTIFACTS + '"';
} else {
  chimpSwitches += ' --screenshotsPath="'+ scrnBin + '" --screenshotsOnError=1';
}

(I also tried screensotsOnError=true) No screenshots to be found.

Hmm I think I answered my own issue by looking at the source repo. If this is the case, perhaps you can update the documentation because it's misleading. Maybe "When using cucumber, Chimp can save them to file or include..."

ghost commented 8 years ago

Yeah, seems to be supported for Cucumber only currently. I think it has been forgotten when Mocha support was first introduced and I didn't implement it Jasmine either. I think opening an enhancement ticket would be the right thing to do.