question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] fixture failures in tests using `fixme` is reported as failed though on retry fixture executed without errors

See original GitHub issue

Context:

  • Playwright Version: 1.21.1
  • Operating System: Mac
  • Node.js version: 16.14.2
  • Browser: All

Code Snippet

Repo to replicate: https://github.com/vigneshrajsb/playwright-fixme-report-issue

npm install 
npx playwright test

Describe the bug

When a test uses test.fixme() at the beginning, the execution immediately stops and exits but the fixtures are executed(as expected).

When a test with setup fixture fails in the first run but passes in a retry for a fixme test, the HTML report still reports the test as failure.

Expected: On retry as the fixture execution was successful, the reporter should flag the test as flaky similar to tests without fixme

image image

Should the reporter flag this test as flaky?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
vigneshrajsbcommented, Apr 28, 2022

ah!! gotchu!! apologies… yeah i think it makes sense now… we will override the lint rules for the playwright tests

1reaction
dgozmancommented, Apr 28, 2022

The issue here is that execution failed before the test.fixme() call had a chance to run. This makes the test a proper “failure”. Try using this variant of test.fixme to avoid the problem and let me know if that helps.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cause test failure from pytest autouse fixture - Stack Overflow
In pytest, a yield -ing fixture has the first half of its definition executed during setup and the latter half executed during teardown....
Read more >
Playwright Fixtures | Playwright Tutorial - part 34 - YouTube
Playwright Test is based on the concept of the test fixtures. Test fixtures are used to establish an environment for each test, ...
Read more >
How to re-run failed tests and maintain state between test runs
The plugin provides two command line options to rerun failures from the last pytest invocation: --lf , --last-failed - to only re-run the...
Read more >
folio - npm
Start using folio in your project by running `npm i folio`. ... Folio is based on the concept of the test fixtures. Test...
Read more >
pytest-retry - PyPI
Currently, failing test fixtures are not retried. · When a flaky test is retried, the plugin runs teardown steps for the test as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found