In this video, we explore how to use Playwright Trace Viewer to troubleshoot your web applications. Playwright is a popular automation testing tool for web applications, and Trace Viewer helps you visualize your tests and track down issues more easily. We'll cover the basics of Trace Viewer and walk you through a step-by-step guide on how to use it effectively. Whether you're a seasoned Playwright user or new to the tool, this video is a must-watch!
The provided video content is a tutorial on using the Trace Viewer tool from Playwright Test. It starts by introducing the tool, explaining it as a snapshot of your recorded test runs which provides more than just video or screenshots. It can provide DOM snapshots, action snapshots, network traces and more.
The presenter then executes a basic test which is designed to fail, in order to illustrate how the trace viewer tool works. The test visits a computer database website, adds a computer and then fails when attempting to assert the presence of the computer.
Next, the presenter shows how to use the Trace Viewer tool. There are several options featured for setting up the tool, both from the command line and from the Playwright config file. Setting the trace view can be done either globally or for specific projects.
Once the tool is properly set up, a failed test run generates a trace.zip
file in the "test-results" folder. This file can then be viewed either by using a command line argument or by dragging and dropping the file into a browser that has the Trace Viewer web app open.
The Trace Viewer provides a timeline of the test run. This includes information on test steps, action snapshots (which shows the action as well as the state of the application before and after the action), console logs, a source code snapshot and more.
Next, the presenter digs deeper into other features and configuration options, such as setting multiple retries, setting a custom output directory, and how traces are integrated into an HTML test reporting system.
The tutorial concludes by emphasizing how powerful and useful the Trace Viewer tool is for debugging tests and even for checking test performance.
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].