Run Tests with User Interface | Bondar Academy
Course: Playwright UI Testing with TypeScript
Module: Getting Started with Playwright
Instructor: Artem Bondar
Lesson Summary
This lesson focuses on how to run Playwright tests using the user interface. Below are the key points discussed: Test Explorer Overview Navigate to the Test Explorer extension to review available tests. Run tests by clicking the play button or check mark next to the test. If buttons are missing, click the refresh icon to reinitialize tests. Project Settings Settings include project options for Chromium , Firefox , and WebKit . Projects are defined in the playwrightconfig.ts file. Only selected projects will execute when running tests. Running Tests In UI mode, the browser remains open after test execution, allowing for manual exploration. Using the command line with npx playwright test closes the browser immediately after execution. Headless mode can be activated by disabling the show browser option. Debugging Features Test execution times are displayed in milliseconds. Error messages indicate where tests fail, providing details on expected vs. received results. The UI runner allows for step-by-step execution review, highlighting actions taken. Before and after views of actions aid in debugging flaky tests. Trace Viewer The Trace Viewer provides a detailed view of test execution after completion. It shows API request details and console logs for deeper analysis. In summary, using the UI mode is recommended for quick test execution, while the Trace Viewer is beneficial for debugging.