-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[BUG] - Skipped tests marks as failed #23201
Comments
Tests may be marked as skipped or failed dyanamically, the final outcome should take that into account. This will also be useful in merge report where same test can come from different platforms with different expectations. Fixes microsoft#23201
Tests may be marked as skipped or failed dyanamically, the final outcome should take that into account. This will also be useful in merge report where same test can come from different platforms with different expectations. Fixes microsoft#23201
@Nck1969 what is the use case where you want to skip the test on one run and the pass on a retry? We are debating whether we should throw if the expectation changes on retry to avoid this sort of ambiguity. |
I don't want to 'skip the test on one run and the pass on a retry' I just add skip condition to the test cause some element on page can be or not to be on the page. |
Can the presence of the element change on retry? As long as you consistently mark the test as skipped on the first run and subsequent retries it will be marked as skipped and will not fail the run. |
Yes, sometimes the presence of the element can change on retry |
Have the same problem as well. |
Tried in 1.42 and still have the same problem. I use
and test report shows the test as failing instead of skipped with retries : 0 Removing the beforeEach and afterEach hooks.
Correctly shows the test as skipped. |
We just tested upgrading Playwright from 1.36.2 to 1.43.1 and found this bug is blocking us. We use the following pattern: test.describe("Some browser-specific test suite", () => {
test.skip(
({ browserName }) => browserName !== "chromium",
"Tests only work in Chromium",
);
test("...", () => {...});
}); In previous versions, everything inside the
However now it seems like Playwright is ignoring the |
System info
Source code
Description:
Skipped test marks as failed if:
Expected
"Test can be skipped" - marks as passed and tests running exit with 0.
Actual
"Test can be skipped" - marks as failed and tests running exit with 1.
The text was updated successfully, but these errors were encountered: