v1.4.5 screenshots are no longer taken when we run-multiple
What are you trying to achieve?
Framework takes a screenshot after failure on v1.4.5, works fine on v1.4.4
What do you get instead?
no screenshot is taken
Details
- CodeceptJS version: 1.4.5
- NodeJS Version: >=8.9.1
- Operating System: OSX
- WebDriverIO: 4.14.0
- Configuration file:
helpers: {
WebDriverIO: {
...
fullPageScreenshots: true,
uniqueScreenshotNames: true,
...
},
Mochawesome: { uniqueScreenshotNames: true }
}
Cannot reproduce this. It worked for me
Hi @PeterNgTr the screenshot gets generated, it does not get attached to the report, so if you open up the mochawesome.html it won't be there, also, we use a specific output directory, with run-multiple, rather than just run
I can see the attached image for failed case.
run-multiple also worked for me
@PeterNgTr just to confirm before I go digging through our stack, which version of grid/hub are you using?
I'm running against puppeteer
Ah, we've got a grid/hub setup of v3.141.5, will take a look if that is causing it as well, thanks for the info though!
I can also confirm that for 1.4.6 with Webdriver the screenshots are not even generated and consequently not attached to the form. Reverted back to 1.4.4 for now.
Confirmed. Since 1.4.5 both commands run and run-multiple are affected. No screenshot is done on failure.
Tested with WebDriverIO
@PeterNgTr I suppose that you don't have problem because you use Puppeteer but it is the last helper on the list (https://github.com/Codeception/CodeceptJS/blob/master/lib/plugin/screenshotOnFail.js#L15). Could you move Mochawesome on the bottom of the list and try if it will work correctly for you? I think Mochawesome should be removed from supportedHelpers list and problem will be fixed.
Additional Info:
I have moved WebdriverIO bellow Mochawesome and run tests and everything works correctly. Then I'm totally sure that Mochawesome should be removed from supportedHelpers list.
Confirmed @PredragPavlovic's info. This order works for me:
const supportedHelpers = [
'Mochawesome',
'WebDriverIO',
'Protractor',
'Appium',
'Nightmare',
'Puppeteer',
];
Fix is on the way -> https://github.com/Codeception/CodeceptJS/pull/1354