Open mitchwd opened 7 months ago
@mitchwd Yah, this is a known issue. The test timing actually only shows the mocha execution times of the tests, so there could have been some other things happening during loading the browser, loading the spec, recording video, uploading to the Cloud (if recording) that aren't accurately captured in this timing.
I'd suggest running in debug mode mode to troubleshoot where timing may be going towards to narrow down the timing difference.
Fwiw I have a hunch that this is what is causing the truncated video output. My videos are as long as Cypress reports in the duration, which is significantly less than the time it takes for the whole test to run.
cy.wrap(null).then(() => cy.wait(request).then(intercept => ...));
allowed me to keep my code in sync.cy.wrap(null).then(() => { ... });
can be useful if you're not sure that your function calls are going to have side effects.After making these changes, the spec that took "4" seconds to run now takes the correct amount of time "15" seconds in Chrome head.
Headless now reports "9" seconds instead of 4, which is still terminating early.
-- Update
Working fine for me now.
Current behavior
The time shown in the text summary at the end of a test is wildly different to the actual time the test took to run.
Running
time npx cypress run --component
shows two very different times:00:39 != 330 seconds
Desired behavior
I expect the summary to show the actual combined test run time.
Test code to reproduce
time npx cypress run --component
Cypress Version
13.7.0
Node version
18.17.1
Operating System
macOS Sonoma 14.4.1 (23E224)
Debug Logs
No response
Other
No response