Commit Graph

42 Commits

Author SHA1 Message Date
Simon Knott 2f3fe8f113
feat(prompt): link to error prompt in terminal (#35341) 2025-03-28 13:42:18 +01:00
Dmitry Gozman e01c901e87
fix: do not screenshot the same page again in afterAll (#35079) 2025-03-06 21:06:19 +00:00
Simon Knott 88623ae3c2
refactor: store copy prompt contents in attachment (#34995) 2025-03-04 17:20:36 +01:00
Simon Knott 6dcb7d2bf5
chore: remove pageSnapshot option (#34962)
Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2025-02-28 13:16:58 +01:00
Simon Knott 2573a80893
chore: change recommended snapshot extension to .aria.yml (#34963) 2025-02-28 10:03:39 +01:00
Simon Knott a04a93c1fd
chore: change pageSnapshot extension to `.snapshot.yml` (#34930) 2025-02-26 14:27:17 +01:00
Simon Knott 8ed2f4319e
chore: add pageSnapshot option (#34669) 2025-02-11 11:04:57 -08:00
Simon Knott fd24521f2e
chore: add page snapshot on test end (#34573)
Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Yury Semikhatsky <yurys@chromium.org>
2025-02-07 09:02:20 +01:00
Dmitry Gozman 2e01154bb5
feat: screenshot:on-first-failure (#33266) 2024-10-24 04:41:35 -07:00
Simon Knott f6219e6e79
Revert "feat(tracing): add .pwtrace to trace file extension" (#32648)
Reverts microsoft/playwright#32581
Relates
https://github.com/microsoft/playwright/issues/32226#issuecomment-2351164727
2024-09-17 15:32:30 +02:00
Simon Knott aeb4d182f7
feat(tracing): add .pwtrace to trace file extension (#32581)
Closes https://github.com/microsoft/playwright/issues/32226

I've updated every mention of `.trace.zip` except for the release notes.
2024-09-14 10:17:07 +02:00
Dmitry Gozman 6ee8f1de2d
Revert "chore: move artifacts recording to TestLifecycleInstrumentation (#30935)" (#31686)
This reverts commit ba5b460444.
2024-07-15 07:01:51 -07:00
Dmitry Gozman ba5b460444
chore: move artifacts recording to TestLifecycleInstrumentation (#30935)
The spirit of this change is reverting #23153. Since that time, we have
moved tracing and `artifactsDir` lifetime into the test runner, so the
reason for revert is mitigated.

Fixes #30287, fixes #30718, fixes #30959.
2024-05-29 18:05:17 -07:00
Pavel Feldman fb90797d73
fix(last-run): remove globalOutputDir (#30571) 2024-04-29 09:02:54 -07:00
Stevan Freeborn 52b803ecf5
feat(trace mode): add on-first-failure mode for traces (#29647)
Implements the changes suggested in #29531
2024-02-28 14:39:18 -08:00
Max Schmitt 5f366088be
chore: get rid of rimraf package (#27790)
This seems more reliable nowadays as rimraf.

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

---------

Signed-off-by: Max Schmitt <max@schmitt.mx>
2023-10-26 19:41:00 +02:00
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