Commit Graph

26 Commits

Author SHA1 Message Date
Max Schmitt
57cca1d96e
Revert "fix: do not collide with other tests when test names have special chars (#23414)" (#24213)
This reverts commit 4b1b4dc23b.

https://github.com/microsoft/playwright/issues/24184

Reopens https://github.com/microsoft/playwright/issues/23386
2023-07-13 20:03:02 +02:00
Max Schmitt
4b1b4dc23b
fix: do not collide with other tests when test names have special chars (#23414)
Fixes https://github.com/microsoft/playwright/issues/23386
2023-06-27 10:34:31 +02:00
Pavel Feldman
b814e8a5f1
chore: bring back per test artifacts (#23153) 2023-05-23 09:36:35 -07:00
MarcNum
fbdafc5fe3
feat: Adding trace option 'on-all-retries' (#21985)
Fixes: #21860
2023-03-31 13:04:24 -07:00
Pavel Feldman
c45d8749b0
chore: split trace events into phases (#21696) 2023-03-15 22:33:40 -07:00
Pavel Feldman
81bd637d94
chore: merge traces into a single zip file (#21242) 2023-02-27 22:31:47 -08:00
Dmitry Gozman
595502ac46
chore: remove unnecessary args in ttest (#21012) 2023-02-18 13:08:17 -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
Fernando Garcia Llorente
cd4ccdfa29
feat: allow options in automatic screenshots (#19143)
Closes #9983 

Allowing Automatic Screenshots in `PlaywrightTestConfig` to have
`fullPage` & `omitBackground` as optional parameters.
2022-12-07 08:45:33 -08:00
Dmitry Gozman
dc1d8dc3da
test: improve a few test runner tests that time out (#15287) 2022-06-30 17:03:01 -07:00
Dmitry Gozman
79163e802a
fix(test runner): screenshot immediately after failure (#15159)
Previously, screenshot was taken after hooks and fixtures teardown.
However, hooks can easily modify the state of the page, and
screenshot would not reflect the moment of failure.

Instead, we take screenshots immediately after the test function
finishes with an error.
2022-06-27 17:46:39 -07:00
Dmitry Gozman
9cd704220c
reland(test runner): run hooks/modifiers as a part of the test (#12518)
Reland: worker.stop() before worker.run() was hanging because
`_runFinished` promise was not initially resolved.
---
This moves `beforeAll`, `afterAll` and some modifiers from running
as a separate entity into running inside a test.

Pros:
- All errors are reported as test errors.
- All artifacts are collected as test artifacts.
- Reporters support this out of the box.

Details:
- Each test computes the necessary hooks to run and runs them.
- Teardown is usually performed during the test (on test failure or worker stop).
- `skipRemaining` is added to `DonePayload` to preserve the behavior
  where `beforeAll` hook failure skips subsequent tests.
  This behavior can now be improved to only target tests affected by this hook.
2022-03-08 16:35:14 -08:00
Pavel Feldman
6a663ef54f
chore(test-runner): revert recent changes to fix tests (#12439)
* Revert "fix(hooks): separate test timeout from beforeAll/afterAll timeouts (#12413)"

This reverts commit 73dee69558.

* Revert "fix(test-runner): rely on test title paths instead of ordinal (#12414)"

This reverts commit d744a87aee.

* Revert "chore(test runner): run hooks/modifiers as a part of the test  (#12329)"

This reverts commit 47045ba48d.
2022-03-01 09:11:17 -08:00
Dmitry Gozman
47045ba48d
chore(test runner): run hooks/modifiers as a part of the test (#12329)
chore(test runner): run hooks/modifiers as a part of the test

This moves `beforeAll`, `afterAll` and some modifiers from running
as a separate entity into running inside a test.

Pros:
- All errors are reported as test errors.
- All artifacts are collected as test artifacts.
- Reporters support this out of the box.

Details:
- Each test computes the necessary hooks to run and runs them.
- Teardown is usually performed during the test (on test failure or worker stop).
- `skipRemaining` is added to `DonePayload` to preserve the behavior
  where `beforeAll` hook failure skips subsequent tests.
  This behavior can now be improved to only target tests affected by this hook.
2022-02-28 11:42:47 -08:00
Dmitry Gozman
192071d5bc
feat(test runner): save traces for beforeAll/afterAll hooks (#10950) 2021-12-15 16:06:10 -08:00
Dmitry Gozman
3c1aaa5338
fix(trace): do not call tracing.stopChunk() twice (#10054) 2021-11-04 21:08:42 -07:00
Pavel Feldman
3673776330
Revert "chore(test-runner): use test name as trace file name prefix (#9619)" (#9956)
This reverts commit 3c420a7cf1.
2021-11-01 20:27:41 -07:00
Max Schmitt
3c420a7cf1
chore(test-runner): use test name as trace file name prefix (#9619) 2021-11-01 18:15:19 +01:00
Dmitry Gozman
4977edcaf3
fix(tracing): fix inconsistent calls of tracing.{start,stop} in fixtures (#9594)
Drive-by: fix error logging.
2021-10-18 21:05:59 -07:00
Pavel Feldman
16baaa317d
chore: remove stale html experiments (#8905) 2021-09-13 20:34:46 -07:00
Pavel Feldman
7bbb63d143
feat(test): start authoring raw reporter (#8790) 2021-09-09 14:17:18 -07:00
Dmitry Gozman
b8f8ca7493
feat(tracing): tracing.{start,stop}Chunk instead of tracing._export (#8521) 2021-08-31 17:03:31 -07:00
Joel Einbinder
a8a3799e9d
fix(test-runner): use describe name in output dir (#8282) 2021-08-24 10:33:40 -04:00
Dmitry Gozman
2aff06ec73
fix(test runner): make sure tracing is not running on non-retries (#8232)
When sharing a context between tests and using `'on-first-retry'` we
could end up with tracing still running in non-retried tests. That's
extra overhead without a reason.
2021-08-16 16:46:35 -07:00
Dmitry Gozman
2744cd6c9a
feat(test runner): remove createContext fixture (#8109)
We can now use `browser.newContext()` or `browser.newPage()` instead.
2021-08-10 09:26:36 -07:00
Dmitry Gozman
3bf3318350
fix(test runner): make sure options, trace and screenshot apply to all contexts (#8083)
- Uses some auto fixtures to set default options and instrumentation on BrowserType.
- Moves screenshot, trace and video to worker-scoped fixtures.
- Throws in page/context when used from beforeAll/afterAll.
- Plumbs around BrowserType to be accessible from Browser and BrowserContext.
2021-08-09 18:09:11 -07:00