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
Hello,
I've had an issue for some weeks now: sometimes my CodeceptJS tests won't end.
It happened all of a sudden, and since that day it first happened, I'd say 50% of my executions don't end.
The scenario is blocked at a certain point, and never stops the process, as if there was a wait with infinite timeout.
I use async functions to help making more consistant behaviors, and scenarios that stop running might all be asynchronous.
I can't tell it for sure, since they never end and I don't have any report, and I have several scenarios that could lead to the page where the execution is stuck.
And the stuck page is varying every time it happens.
I use CodeceptJS v3.2.2 with Puppeteer v11.0.0.
My ~1350 scenarios run on a Azure DevOps environment, with 16 workers (npx codeceptjs run-workers --suites 16 --verbose).
I've never had any issue with that configuration before.
I don't know if it can help, but some time ago I've set the waitForAction option to 150ms to make the execution take less than an hour, which caused some inconsistant behaviors, and tried fixing that with the async calls. The mentioned problem occured 2 or 3 months after that, and I haven't updated anything when it first appeared.
I know for sure this test was blocked today, after the "I.clickText('Save')", a concurrent DB access error occured, and my test stopped here (it usually just makes the test fail since I.see will return false).
Scenario('scenario test',async({ I })=>{I.clickText('Add')I.seeInCurrentUrl('/test')I.see('Add')I.clickText('panel1')I.fillFieldByLabel('f1','v1')I.fillFieldByLabel('f2','v2')I.clickText('Save')I.waitLoaded()// VerificationsI.see('Test')I.waitLoaded()I.clickText('test')awaitI.openExpansionPanel('panel1')I.seeTextsInElement("f1","v1","li")I.seeTextsInElement("f2","v2","li")})
Both openExpansionPanel and waitLoaded function are set in my steps_file, using an actor.
If it can help, the openExpansionPanel function is aync because it is supposed to open a panel, but sometimes it's like the element is not clicked, so if I don't see the opened panel, I retry with retryTo (depending on the case, I use tryTo or retryTo several times in my project to do such things).
I tried adding a scenario timeout with both "timeout" option in codecept.conf.js and inside the scenario definition, but they both apply to steps and not to scenarios. I don't know if it's a bug or an issue with the doc, but they definitely don't work for the scenario itself in my project (I tried with a 5 seconds timeout and my scenario stops after around 10 seconds, at a step that is supposed to take 6-7 seconds to execute, and the stacktrace names that particular step).
Would anyone have an idea on how to solve that issue (either by fixing the cause or adding a working scenario timeout) or can tell me it's a CodeceptJS bug?
Thanks in advance!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I've had an issue for some weeks now: sometimes my CodeceptJS tests won't end.
It happened all of a sudden, and since that day it first happened, I'd say 50% of my executions don't end.
The scenario is blocked at a certain point, and never stops the process, as if there was a wait with infinite timeout.
I use async functions to help making more consistant behaviors, and scenarios that stop running might all be asynchronous.
I can't tell it for sure, since they never end and I don't have any report, and I have several scenarios that could lead to the page where the execution is stuck.
And the stuck page is varying every time it happens.
I use CodeceptJS v3.2.2 with Puppeteer v11.0.0.
My ~1350 scenarios run on a Azure DevOps environment, with 16 workers (npx codeceptjs run-workers --suites 16 --verbose).
I've never had any issue with that configuration before.
I don't know if it can help, but some time ago I've set the waitForAction option to 150ms to make the execution take less than an hour, which caused some inconsistant behaviors, and tried fixing that with the async calls. The mentioned problem occured 2 or 3 months after that, and I haven't updated anything when it first appeared.
I know for sure this test was blocked today, after the "I.clickText('Save')", a concurrent DB access error occured, and my test stopped here (it usually just makes the test fail since I.see will return false).
With the openExpansionPanel function:
And the waitLoaded function (basically a wait() and then wait for my loader element to disappear) :
Both openExpansionPanel and waitLoaded function are set in my steps_file, using an actor.
If it can help, the openExpansionPanel function is aync because it is supposed to open a panel, but sometimes it's like the element is not clicked, so if I don't see the opened panel, I retry with retryTo (depending on the case, I use tryTo or retryTo several times in my project to do such things).
I tried adding a scenario timeout with both "timeout" option in codecept.conf.js and inside the scenario definition, but they both apply to steps and not to scenarios. I don't know if it's a bug or an issue with the doc, but they definitely don't work for the scenario itself in my project (I tried with a 5 seconds timeout and my scenario stops after around 10 seconds, at a step that is supposed to take 6-7 seconds to execute, and the stacktrace names that particular step).
Would anyone have an idea on how to solve that issue (either by fixing the cause or adding a working scenario timeout) or can tell me it's a CodeceptJS bug?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions