Playwright Script Execution and HTML Report | Run Tests in Headed & Headless Mode
Description: In this session, we will learn how to execute a Playwright automation script and explore the Playwright HTML Report to understand test execution results.
We will use the login application script created in the previous session, where we identified locators for the Email field, Password field, and Login button using Playwright's getByRole() function.
Topics Covered in This Video:
How to execute a Playwright test script using the terminal.
Running Playwright tests in Headless Mode.
Understanding the npx playwright test command.
Running Playwright tests in Headed Mode using the --headed flag.
Observing browser actions during test execution.
How to generate and open the Playwright HTML Report.
Understanding test execution status, passed tests, failed tests, and execution duration.
Exploring detailed test execution results in the HTML report.
Important Playwright Commands
1. Execute Playwright Tests (Headless Mode)
npx playwright test
2. Execute Playwright Tests (Headed Mode)
bash
npx playwright test --headed
3. Open Playwright HTML Report
bash
npx playwright show-report
What You Will Learn
By the end of this session, you will understand how to run Playwright automation scripts in both headless and headed modes and how to analyze test execution results using the built-in Playwright HTML Report.
This tutorial is part of our step-by-step Playwright automation testing series, designed to help beginners build their knowledge of Playwright with practical examples.
Stay tuned for the next session, where we will explore more Playwright features and continue learning test automation!
chapters
------
00:00 - Introduction & Recap
00:58 - Running Tests in Headless Mode
01:53 - Running Tests in Headed Mode
02:37 - Viewing the Playwright HTML Report
03:24 - Summary & Next Steps
#Playwright #PlaywrightAutomation #PlaywrightTesting #AutomationTesting #SoftwareTesting #JavaScript #WebAutomation #PlaywrightTutorial #HTMLReport #TestAutomation Close description
We will use the login application script created in the previous session, where we identified locators for the Email field, Password field, and Login button using Playwright's getByRole() function.
Topics Covered in This Video:
How to execute a Playwright test script using the terminal.
Running Playwright tests in Headless Mode.
Understanding the npx playwright test command.
Running Playwright tests in Headed Mode using the --headed flag.
Observing browser actions during test execution.
How to generate and open the Playwright HTML Report.
Understanding test execution status, passed tests, failed tests, and execution duration.
Exploring detailed test execution results in the HTML report.
Important Playwright Commands
1. Execute Playwright Tests (Headless Mode)
npx playwright test
2. Execute Playwright Tests (Headed Mode)
bash
npx playwright test --headed
3. Open Playwright HTML Report
bash
npx playwright show-report
What You Will Learn
By the end of this session, you will understand how to run Playwright automation scripts in both headless and headed modes and how to analyze test execution results using the built-in Playwright HTML Report.
This tutorial is part of our step-by-step Playwright automation testing series, designed to help beginners build their knowledge of Playwright with practical examples.
Stay tuned for the next session, where we will explore more Playwright features and continue learning test automation!
chapters
------
00:00 - Introduction & Recap
00:58 - Running Tests in Headless Mode
01:53 - Running Tests in Headed Mode
02:37 - Viewing the Playwright HTML Report
03:24 - Summary & Next Steps
#Playwright #PlaywrightAutomation #PlaywrightTesting #AutomationTesting #SoftwareTesting #JavaScript #WebAutomation #PlaywrightTutorial #HTMLReport #TestAutomation Close description
