Commit Graph

13 Commits

Author SHA1 Message Date
Dmitry Gozman
d67515f6c1
chore(test runner): do not produce some of the fake skipped test results (#27730) 2023-10-20 17:01:46 -07:00
Dmitry Gozman
fa286de0b3
fix(test runner): extract FailureTracker helper (#26757)
This way we can reuse it for:
- tracking `maxFailures` across phases;
- tracking failures for runner;
- tracking failures for `runJob` helper class later on.

Fixes #26344.
2023-08-31 15:32:29 -07:00
Dmitry Gozman
91da67fab1
test: remove magic headers in ttest (#20867)
Instead, explicitly import from '@playwright/test'.
2023-02-14 19:20:56 -08:00
Pavel Feldman
1b941bcf2e
chore: simplify ttests (#20733) 2023-02-07 15:11:44 -08:00
Dmitry Gozman
03fe75251b
fix(test runner): show tests as interrupted when maxFailures stops them (#16178)
Previously, we marked these tests as skipped, and it was sometimes
confusing, because they did actually run and produce some output/artifacts.
2022-08-03 15:25:25 -07:00
Andrey Lushnikov
2336692e8a
feat: support clarification message for expect (#11735)
The clarification message is displayed in the HTML report as the name of the step:

![image](https://user-images.githubusercontent.com/746130/151852652-48194140-5ea4-439d-afee-12583a8caf71.png)

It is also shown in terminal output:

![image](https://user-images.githubusercontent.com/746130/151852666-5c956ef1-6e94-4bc2-8e55-b58688dfc7e0.png)

Fixes #7816
2022-01-31 17:14:59 -08:00
Dmitry Gozman
34b84841b0
chore(test runner): create TestResult instances lazily in dispatcher (#10921)
This prepares for beforeAll/afterAll hooks to be handled in the same way.
Since we do not know in advance whether a hook will run, we must create
TestResults lazily.
2021-12-14 14:10:56 -08:00
Dmitry Gozman
d846c05619
fix(test runner): make obtainWorker() resolve with null when stopping (#8018)
This ensures that we properly exit from `Dispatcher.run()`, print
epilogue and set the right exit code.
2021-08-05 15:00:00 -07:00
Dmitry Gozman
82d2ec0b2d
test: unflake "max-failures should stop workers" (#7918) 2021-07-29 13:32:44 -07:00
Dmitry Gozman
2073193c36
fix(test runner): keep track of remaining tests on the runner side (#7486)
This fixes two issues:
- Sudden worker process exit is properly accounted for.
- We can stop() workers willy-nilly, e.g. after reaching maxFailures.

Details:
- DonePayload does not send `reamining` anymore, and worker does not track it.
- Instead, `Dispatcher._runJob` track remaining tests and acts accordingly.
- Upon worker exit, we emulate a fatal error for all remaining tests.

Drive-by:
- Do not report onTestBegin after reaching maxFailures to avoid confusion.
  Before, we did report onTestBegin, but not onTestEnd.
- List reporter aligned between "running" and "finished" state - it was
  one character misplaced.
- Added a SIGINT test.
2021-07-07 12:04:43 -07:00
Joel Einbinder
aa72b2b9bb
fix(pwt): max-failures should work with retries (#7127)
fixes #7112
2021-06-14 22:16:16 -07:00
Dmitry Gozman
46a0213769
chore: remove internal uses of "folio" (#6931)
Replaced by "pwt" or "playwright test".
2021-06-06 22:07:07 -07:00
Dmitry Gozman
f745bf1fbc
chore: bring in folio source (#6923)
- Source now lives at `src/test`.
- Former folio tests live at `tests/playwright-test`.
- We use `src/test/internal.ts` that exposes base test without
  Playwright fixtures for most tests (to avoid modifications for now).
- Test types live in `types/testFoo.d.ts`.
- Stable test runner is installed to `tests/config/test-runner` during `npm install`.
- All deps including test-only are now listed in `package.json`.
  Non-test deps must also be listed in `build_package.js` to get included.
2021-06-06 17:09:53 -07:00