From 57210147f3922b5bc09c33e0f4841ae2e607df0a Mon Sep 17 00:00:00 2001 From: Debbie O'Brien Date: Tue, 17 Jan 2023 12:42:50 +0100 Subject: [PATCH] docs: improve trace viewer screens (#20147) --- docs/src/trace-viewer-intro-csharp-java-python.md | 2 +- docs/src/trace-viewer-intro-js.md | 12 ++++++------ docs/src/trace-viewer.md | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/src/trace-viewer-intro-csharp-java-python.md b/docs/src/trace-viewer-intro-csharp-java-python.md index a1383f451d..05e25e8475 100644 --- a/docs/src/trace-viewer-intro-csharp-java-python.md +++ b/docs/src/trace-viewer-intro-csharp-java-python.md @@ -109,6 +109,6 @@ pwsh bin/Debug/netX/playwright.ps1 show-trace trace.zip View traces of your test by clicking through each action or hovering using the timeline and see the state of the page before and after the action. Inspect the log, source and network during each step of the test. The trace viewer creates a DOM snapshot so you can fully interact with it, open devtools etc. -Playwright Trace Viewer +Playwright Trace Viewer To learn more check out our detailed guide on [Trace Viewer](/trace-viewer.md). diff --git a/docs/src/trace-viewer-intro-js.md b/docs/src/trace-viewer-intro-js.md index 4b7d587de6..42651d2f32 100644 --- a/docs/src/trace-viewer-intro-js.md +++ b/docs/src/trace-viewer-intro-js.md @@ -55,19 +55,19 @@ The `trace-on` flag was introduced in Playwright v1.25. Check your `package.json ## Opening the HTML Report -If you have a failed test then tests will run a total of 3 times. On the first retry the trace will be recorded. After the second retry the tests will stop running and a HTML report is available to view. +The HTML report shows you a report of all your tests that have been ran and on which browsers as well as how long they took. Tests can be filtered by passed tests, failed, flakey or skipped tests. You can also search for a particular test. Clicking on a test will open the detailed view where you can see more information on your tests such as the errors, the test steps and the trace. ```bash npx playwright show-report ``` -In the HTML report click on the trace icon to directly open the trace file. +In the HTML report click on the trace icon next to the test name file name to directly open the trace for the required test. -Playwright HTML Report +Playwright HTML Report -You can also click on the test file and scroll down to the `'Traces'` tab and open the trace by clicking on the trace screenshot. +You can also click open the detailed view of the test and scroll down to the `'Traces'` tab and open the trace by clicking on the trace screenshot. -Playwright HTML Report +Playwright HTML Report detailed view To learn more about reporters check out our detailed guide on reporters including the [HTML Reporter](/test-reporters.md#html-reporter). @@ -76,6 +76,6 @@ To learn more about reporters check out our detailed guide on reporters includin View traces of your test by clicking through each action or hovering using the timeline and see the state of the page before and after the action. Inspect the log, source and network during each step of the test. The trace viewer creates a DOM snapshot so you can fully interact with it, open devtools etc. -Playwright Trace Viewer +Playwright Trace Viewer To learn more about traces check out our detailed guide on [Trace Viewer](/trace-viewer.md). diff --git a/docs/src/trace-viewer.md b/docs/src/trace-viewer.md index 7d7946debb..51e86a0f49 100644 --- a/docs/src/trace-viewer.md +++ b/docs/src/trace-viewer.md @@ -127,6 +127,7 @@ You can then open the HTML report and click on the trace icon to open the trace. npx playwright show-report ``` ## Recording a trace on CI +* langs: js Traces should be run on continuous integration on the first retry of a failed test by setting the `trace: 'on-first-retry'` option in the test configuration file. This will produce a `trace.zip` file for each test that was retried.