Commit Graph

23 Commits

Author SHA1 Message Date
Dmitry Gozman
41e3e6d13f
fix(tracing): avoid clashing network file names (#22126)
With two contexts in the same test, we can get:
- `<testId>.network` and `<testId>-1.network` files;
- for export, we can copy `<testId>.network` into `<testId>-1.network`
and try to copy into a file when another trace is reading from it.

Fixes #22089.
2023-03-31 17:29:39 -07:00
Dmitry Gozman
f7244a7e34
fix(tracing): allow disabling tracing through env (#22050)
We point `tracesDir` inside `test-results`, so it is removed between
test runs, while reused context is still writing there.
    To fix the issue, we can now pass `env.PW_TEST_REUSE_CONTEXT`.

References #21993.
2023-03-29 13:35:31 -07:00
Pavel Feldman
ecd0f927f4
chore: make stacks rendering live in ui mode (#21728)
Co-authored-by: Max Schmitt <max@schmitt.mx>
2023-03-16 18:17:07 -07:00
Pavel Feldman
de3a5e2a91
chore(trace): include expect steps in a trace (#21199) 2023-02-28 13:26:23 -08:00
Pavel Feldman
81bd637d94
chore: merge traces into a single zip file (#21242) 2023-02-27 22:31:47 -08:00
Dmitry Gozman
24c8d45c70
chore: enable tsc for ttest sources (#21018) 2023-02-19 11:18:07 -08: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
d1c161ce99
chore: merge the util exports (#20110) 2023-01-13 13:50:38 -08:00
Dmitry Gozman
cb30cb4eb7
feat(test runner): add --trace cli option (#16277) 2022-08-05 09:20:39 -07:00
Dmitry Gozman
2fa48483af
test: unflake "should retain traces for interrupted tests" (#16235)
Ensure both tests start before one of them finishes.
2022-08-04 09:18:18 -07: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
Dmitry Gozman
6a60de1b2f
test: add failing test for traces after interruption (#15796) 2022-07-19 13:50:52 -07:00
Pavel Feldman
030e7d211c
chore(har): allow replaying from zip har (#14962) 2022-06-17 16:11:22 -07:00
Ross Wollman
3974d1b359
revert(#14797): fix(test runner): collect artifacts when calling browser.close() (#14846)
Revert "fix(test runner): collect artifacts when calling `browser.close()` (#14797)"

This reverts commit c7a28ac7e9.

Looks like it broke a bunch of tracing tests:

* Good: https://github.com/microsoft/playwright/runs/6838098316?check_suite_focus=true
* First Bad: https://github.com/microsoft/playwright/runs/6838104691?check_suite_focus=true
* Still bad on HEAD (88664c39c9): https://github.com/microsoft/playwright/runs/6868333846?check_suite_focus=true
2022-06-13 17:20:59 -07:00
Dmitry Gozman
c7a28ac7e9
fix(test runner): collect artifacts when calling browser.close() (#14797)
Previously, we only collected artifacts on context closure.
However, in serial mode it is possible to close the browser instead.
2022-06-10 14:11:34 -07:00
Yury Semikhatsky
2bcdf68ef5
fix(runner): do not override trace files in afterAll (#14529) 2022-05-31 15:21:51 -07:00
Dmitry Gozman
c3beb71b07
fix(test runner): do not run automatic fixtures for beforeAll hooks (#14104)
There are a few issues this covers:
- Some fixtures like `page` and `context` are not allowed in `beforeAll`
  hooks, so using them in automatic fixture makes it throw.
- Running automatic fixture solely for `afterAll` is unexpected.
  This currently happens when `afterAll` is run for cleanup after
  fixture timeout/throw.

For built-in playwright fixture, we keep `'all-hooks-included'` auto mode.

Added a doc explaining the execution order.
2022-05-13 11:17:20 +01:00
Pavel Feldman
bde7bf4ea9
chore: move registry & dispatchers to under server (#13370) 2022-04-06 22:21:27 -07:00
Pavel Feldman
d14ecec612
chore: remove flaky-by-design test (#12434) 2022-03-01 08:52:52 -08:00
Yury Semikhatsky
706c897031
feat(fixtures): respect tracing config for APIRequestContext (#11954) 2022-02-09 08:54:09 -08: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
Pavel Feldman
7b64161a37
feat(test-runner): allow specifying fine-grained trace options (#10147) 2021-11-08 15:39:58 -08:00
Dmitry Gozman
3c1aaa5338
fix(trace): do not call tracing.stopChunk() twice (#10054) 2021-11-04 21:08:42 -07:00