Skip to content

[Question] Skip on retry #17652

@JackSpa89

Description

@JackSpa89

Hello,

I have a question. Currently in our test suite we have some tests running, that are flaky in the beforeEach hook ( due to some frontend issue ). The test it self is supposed to be skipped under conditions ( that we only know after the beforeEach hook is executed. ).
So the issue is, that we have the retry mechanism enabled and if the beforeEach hook fails for example in the first try, but succeeds in the 2nd try and then the test is supposed to skipped.
But playwright still seems to mark the test as failed.
I could put the beforeEach hook in the tests itself and this would "fix" it, but we have like 10 tests with the same preconditions and this does not seem like the best way.

So is there any way to mark the test still as skipped if first beforeEach hook fails? Or is this a bug from playwright side?
Any help would be appreciated :)

Thanks and BR

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions