-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] Specific test retries #10825
Comments
@awnclaim There is no such feature as of today. As a workaround, you can put this test into a separate file and use a separate project for it: // playwright.config.ts
const config = {
projects: [
{
name: 'default',
testIgnore: ['retried-test.spec.ts'],
},
{
name: 'retried',
testMatch: /retried-test.spec.ts/,
retries: 2,
},
],
}; |
Hello, Thanks for your reply. I would like to express my strong desire to include this in your backlog, as in the workaround you suggested all test functions will be retried in case our backend does not respond, and this is not something we would want. Could I please ask another question? To apply this workaround, I would need to create separate authentication setups for the suits not to impede each other (i. e., make several suits log in under different credentials). Right now, as I understand, only one |
Of course 👍
Yeah, that's not an easy problem, but we are working on a nice ergonomic solution for this. For now, you'll have to log in twice in the single |
Hello, Thank you so much for drawing my attention to this instruction, I hadn't noticed it before. I'll stay tuned to the updates from you guys! |
Let's keep this issue open to track the "set retries per single test" feature request. |
Great to see a label saying this is en route! My overall setup depends on related test cases being in the same file, but only one of them should ever need a retry. It'd be super helpful to be able to specify that test's retry count with the same syntax I use for its custom timeout. |
With 1.28 you can do test.describe.configure({
retries: 3,
}); |
As far as I can tell, this is still not possible. You can set retries per |
There is support for anonymous describe so you could do something like this to override test.describe(() => {
test.describe.configure({ retries: 2 });
test('title', async () => {
...
});
}); |
Hi!
Is there any way I could set the maximum number of retries to a specific test function?
My case is the following: in my test, I create an object via a POST request and then I want to verify that the response body of a GET request contains some info about it. The matter is that our backend will return no info within 2-4 minutes after the object is created, so I need to send one request after another, retrying this test, to ultimately reach the point when the response contains the info I need. At the same time, I don't want my other tests / test files to be retried X times as well. If they fail, they fail.
Is it possible to make such an adjustment to one test only? Thank you very much!
The text was updated successfully, but these errors were encountered: