You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Caught this problem when tried to generate Mochawesome report. So, I just artificially failed several tests for this. I need add different content for different Errors during test run to Mochawesome report.
After several failed tests that go one by one, cypress performance begin decrease. Here is the sample from my console:
Time execution for failed tests got from report.
In two runs spec are the same. Tests in suite are also the same and do the same assertions.
On image I failed 4 tests and after that performance was lower as in run without this failed tests. For 21 tests time execution was increased on more than one minute.
Desired behavior:
Think it isn't good if I have many tests in one suite and several first of them - filed.
Test code to reproduce
Unfortunately, can't provide some code samples or some test automation framework. But can provide additional information:
All tests execute quite heavy custom Cypress tasks: from 3 to 5 tasks per one test that work with images (image composing, working with image bitmap, images joining, trimming transparent images background, converting from one image MIME type to other and so on). Also almost each test spec using Cypress.Blob class functionality.
On test (inside each spec) level all cypress commands are wrapped into sync NodeJS code:
beforeEach hook in suite:
importloginPagefrom'../../../support/pages/loginPage';beforeEach('Login to application',()=>{loginPage().login();});
on other layers exists cypress custom commands (using Cypress.Commands.add)
3. Also I disabled video recording (but if it on, it hasn't any influence);
4. I run Cypress specs programmatically using Cypress Module API:
constcypress=require('cypress');constyargs=require('yargs');constargv=yargs.option('spec',{alias: 's'}).option('browser',{alias: 'b',default: 'chrome'}).option('noExit',{type: 'boolean'}).option('headless',{type: 'boolean',default: false}).help().argv;// some async code herecypress.run({browser: argv.browser,env: argv.env,spec: argv.spec,headless: argv.headless,exit: !argv.noExit,}).then(res=>{// some actions with res object}).catch(err=>{console.error(err);process.exit(1);});
Use Module API because need to execute some async code before run cypress.
Run command example: node cypress/support/runner.js -b chrome --headless
Versions
Cypress version: 4.4.0 (the latest one);
Browser: Chrome in headless mode. Version 81.0.4044.113 (Official Build) (64-bit);
OS: Ubuntu 18.04.
The text was updated successfully, but these errors were encountered:
We'd really need a fully reproducible example in order to verify why this performance issue is happening. May be something within the login() function.
Unfortunately we have to close this issue as there is not enough information to reproduce the problem. This does not mean that your issue is not happening - it just means that we do not have a path to move forward.
Please comment in this issue with a reproducible example and we will consider reopening the issue.
Current behavior:
Caught this problem when tried to generate Mochawesome report. So, I just artificially failed several tests for this. I need add different content for different Errors during test run to Mochawesome report.
After several failed tests that go one by one, cypress performance begin decrease. Here is the sample from my console:
Time execution for failed tests got from report.
In two runs spec are the same. Tests in suite are also the same and do the same assertions.
On image I failed 4 tests and after that performance was lower as in run without this failed tests. For 21 tests time execution was increased on more than one minute.
Desired behavior:
Think it isn't good if I have many tests in one suite and several first of them - filed.
Test code to reproduce
Unfortunately, can't provide some code samples or some test automation framework. But can provide additional information:
Cypress.Blob
class functionality.beforeEach hook in suite:
and JS function:
on other layers exists cypress custom commands (using
Cypress.Commands.add
)3. Also I disabled video recording (but if it on, it hasn't any influence);
4. I run Cypress specs programmatically using Cypress Module API:
Use Module API because need to execute some async code before run cypress.
Run command example:
node cypress/support/runner.js -b chrome --headless
Versions
Cypress version: 4.4.0 (the latest one);
Browser: Chrome in headless mode. Version 81.0.4044.113 (Official Build) (64-bit);
OS: Ubuntu 18.04.
The text was updated successfully, but these errors were encountered: