CodeceptJS icon indicating copy to clipboard operation
CodeceptJS copied to clipboard

v1.4.5 screenshots are no longer taken when we run-multiple

Open xMutaGenx opened this issue 8 years ago • 12 comments

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 }
    }

xMutaGenx avatar Nov 07 '18 11:11 xMutaGenx

screen shot 2018-11-13 at 11 59 54 am Cannot reproduce this. It worked for me

kobenguyent avatar Nov 13 '18 11:11 kobenguyent

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

xMutaGenx avatar Nov 16 '18 13:11 xMutaGenx

screenshot from 2018-11-19 15-11-23 I can see the attached image for failed case.

kobenguyent avatar Nov 19 '18 14:11 kobenguyent

screenshot from 2018-11-19 15-14-05 run-multiple also worked for me

kobenguyent avatar Nov 19 '18 14:11 kobenguyent

@PeterNgTr just to confirm before I go digging through our stack, which version of grid/hub are you using?

xMutaGenx avatar Nov 19 '18 14:11 xMutaGenx

I'm running against puppeteer

kobenguyent avatar Nov 19 '18 14:11 kobenguyent

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!

xMutaGenx avatar Nov 19 '18 15:11 xMutaGenx

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.

yogainalift avatar Nov 21 '18 12:11 yogainalift

Confirmed. Since 1.4.5 both commands run and run-multiple are affected. No screenshot is done on failure. Tested with WebDriverIO

mirao avatar Nov 23 '18 12:11 mirao

@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.

PredragPavlovic avatar Nov 27 '18 08:11 PredragPavlovic

Confirmed @PredragPavlovic's info. This order works for me:

const supportedHelpers = [
  'Mochawesome',
  'WebDriverIO',
  'Protractor',
  'Appium',
  'Nightmare',
  'Puppeteer',
];

mirao avatar Nov 27 '18 15:11 mirao

Fix is on the way -> https://github.com/Codeception/CodeceptJS/pull/1354

kobenguyent avatar Nov 28 '18 15:11 kobenguyent