Playwright TypeScript #9 - Run Tests (Headed, UI Mode, Projects, Specific Files)
Description: Learn how to run Playwright tests in different ways using TypeScript. In this video I show you how to use Playwright's CLI commands to control exactly which tests run, on which browsers, and in which mode (headless, headed, or UI mode).
In a real project you won't run thousands of tests on every browser every time. You need to run only the login tests, only Chrome, a single spec file, or tests that match a keyword. This tutorial covers all of that, plus a common interview question: which wins when the config file and the command line disagree?
What you'll learn:
✅ npx playwright test – run all tests on all configured browsers
✅ Headless vs headed mode and why headless is better for CI/CD
✅ --headed flag to watch tests in a real browser
✅ --ui flag to open Playwright UI Mode (timeline, source, console, network, before/after actions)
✅ --project flag to run on Chromium, Firefox, or WebKit (single or multiple)
✅ How playwright.config.ts projects work
✅ CLI flags override config settings (interview question)
✅ Running a specific test file
✅ Running test files by keyword in the file name
✅ Combining flags for real-world scenarios
⏱️ TIMESTAMPS
0:00 Intro – why you shouldn't run every test every time
0:57 Playwright docs – Running & Debugging Tests
1:28 npx playwright test – the basic command
2:18 playwright.config.ts – Chromium, Firefox & WebKit projects
3:27 Run tests in headed mode (--headed)
4:17 Headless vs headed speed + CI/CD best practice
5:27 Playwright UI Mode (--ui)
6:51 UI Mode walkthrough – filters, timeline, source, console, network
8:20 Run tests on a specific browser (--project)
9:30 Run tests on multiple browsers
10:47 Why 15 tests became 5 (tests × browsers)
11:22 Combining --project with --headed
11:40 CLI vs config – which takes priority? (interview question)
12:06 Run a specific test file
13:45 Combine file + project + headed flags
14:17 Run test files by keyword in the file name
15:26 Debugging tips & wrap-up
📌 Commands used in this video:
npx playwright test
npx playwright test --headed
npx playwright test --ui
npx playwright test --project=chromium
npx playwright test --project=webkit --project=firefox
npx playwright test codegen.spec.ts
npx playwright test login
📚 Playwright TypeScript full playlist: [ADD PLAYLIST LINK]
⬅️ Previous: #8 Codegen (Record, Pick Locator, Assertions, Emulation): [ADD LINK]
👍 If this helped, like the video, subscribe, and turn on notifications for the rest of the Playwright TypeScript series. Drop your questions in the comments.
#Playwright #PlaywrightTypeScript #TestAutomation #PlaywrightTutorial #TypeScript #AutomationTesting #QAAutomation #E2ETesting #SoftwareTesting #SDET
🔔 Subscribe for FREE Software Testing Tutorials → https://www.youtube.com/c/TestingFunda
==================================
🚀 WHAT YOU'LL LEARN ON THIS CHANNEL
==================================
✅ Manual & Automation Testing
✅ Selenium, Cypress, Playwright & Appium
✅ API Testing with Postman
✅ Performance Testing with JMeter
✅ Java & Python for Testers
✅ Agile, SDLC, STLC & Interview Prep
==================================
📚 FREE TUTORIAL PLAYLISTS
==================================
🔹 Selenium Tutorials (Free)
https://www.youtube.com/watch?v=5hyEnZT9AkQ&list=PLBw1ubD1J1UjP1rZMbU8NSh2ajE12Yjjf
🔹 JMeter Performance Testing (Free)
https://www.youtube.com/watch?v=s33Bqz0vAUw&list=PLBw1ubD1J1UgVniCSUlg_LKRzlF11CZZB
🔹 Postman API Testing (Free)
https://www.youtube.com/playlist?list=PLBw1ubD1J1UgVniCSUlg_LKRzlF11CZZB
🔹 Java Programming for Testers (Free)
https://www.youtube.com/watch?v=C8HRfmJ_ZZQ&list=PLBw1ubD1J1UjGNxe10eY-H7e9cQ12Qk_l
🔹 Cypress Automation Testing (Free)
https://www.youtube.com/watch?v=OvCLwh5vN8g&list=PLBw1ubD1J1Ujws5XLs7BGJqQkQVpJtmBJ
🔹 Agile Testing Series (Free)
https://www.youtube.com/playlist?list=PLBw1ubD1J1Uif-cFY6BJRbjc3Ah9bKpSd
🔹 Animated Software Testing Videos (Free)
https://www.youtube.com/watch?v=jRcsuCrQI_s&list=PLBw1ubD1J1UhnuUX3Kd5OP5r9qaDHie-T
==================================
🔗 CONNECT WITH US
==================================
📺 YouTube → https://www.youtube.com/c/TestingFunda
==================================
⚠️ DISCLAIMER
==================================
All content is for educational purposes only.
#SoftwareTesting #AutomationTesting #Selenium #QA #ManualTesting #Postman #JMeter #Cypress #JavaTesting #APITesting #PerformanceTesting #QAEngineer #SDET #TestingTutorials #FreeTutorials #2026 Close description
In a real project you won't run thousands of tests on every browser every time. You need to run only the login tests, only Chrome, a single spec file, or tests that match a keyword. This tutorial covers all of that, plus a common interview question: which wins when the config file and the command line disagree?
What you'll learn:
✅ npx playwright test – run all tests on all configured browsers
✅ Headless vs headed mode and why headless is better for CI/CD
✅ --headed flag to watch tests in a real browser
✅ --ui flag to open Playwright UI Mode (timeline, source, console, network, before/after actions)
✅ --project flag to run on Chromium, Firefox, or WebKit (single or multiple)
✅ How playwright.config.ts projects work
✅ CLI flags override config settings (interview question)
✅ Running a specific test file
✅ Running test files by keyword in the file name
✅ Combining flags for real-world scenarios
⏱️ TIMESTAMPS
0:00 Intro – why you shouldn't run every test every time
0:57 Playwright docs – Running & Debugging Tests
1:28 npx playwright test – the basic command
2:18 playwright.config.ts – Chromium, Firefox & WebKit projects
3:27 Run tests in headed mode (--headed)
4:17 Headless vs headed speed + CI/CD best practice
5:27 Playwright UI Mode (--ui)
6:51 UI Mode walkthrough – filters, timeline, source, console, network
8:20 Run tests on a specific browser (--project)
9:30 Run tests on multiple browsers
10:47 Why 15 tests became 5 (tests × browsers)
11:22 Combining --project with --headed
11:40 CLI vs config – which takes priority? (interview question)
12:06 Run a specific test file
13:45 Combine file + project + headed flags
14:17 Run test files by keyword in the file name
15:26 Debugging tips & wrap-up
📌 Commands used in this video:
npx playwright test
npx playwright test --headed
npx playwright test --ui
npx playwright test --project=chromium
npx playwright test --project=webkit --project=firefox
npx playwright test codegen.spec.ts
npx playwright test login
📚 Playwright TypeScript full playlist: [ADD PLAYLIST LINK]
⬅️ Previous: #8 Codegen (Record, Pick Locator, Assertions, Emulation): [ADD LINK]
👍 If this helped, like the video, subscribe, and turn on notifications for the rest of the Playwright TypeScript series. Drop your questions in the comments.
#Playwright #PlaywrightTypeScript #TestAutomation #PlaywrightTutorial #TypeScript #AutomationTesting #QAAutomation #E2ETesting #SoftwareTesting #SDET
🔔 Subscribe for FREE Software Testing Tutorials → https://www.youtube.com/c/TestingFunda
==================================
🚀 WHAT YOU'LL LEARN ON THIS CHANNEL
==================================
✅ Manual & Automation Testing
✅ Selenium, Cypress, Playwright & Appium
✅ API Testing with Postman
✅ Performance Testing with JMeter
✅ Java & Python for Testers
✅ Agile, SDLC, STLC & Interview Prep
==================================
📚 FREE TUTORIAL PLAYLISTS
==================================
🔹 Selenium Tutorials (Free)
https://www.youtube.com/watch?v=5hyEnZT9AkQ&list=PLBw1ubD1J1UjP1rZMbU8NSh2ajE12Yjjf
🔹 JMeter Performance Testing (Free)
https://www.youtube.com/watch?v=s33Bqz0vAUw&list=PLBw1ubD1J1UgVniCSUlg_LKRzlF11CZZB
🔹 Postman API Testing (Free)
https://www.youtube.com/playlist?list=PLBw1ubD1J1UgVniCSUlg_LKRzlF11CZZB
🔹 Java Programming for Testers (Free)
https://www.youtube.com/watch?v=C8HRfmJ_ZZQ&list=PLBw1ubD1J1UjGNxe10eY-H7e9cQ12Qk_l
🔹 Cypress Automation Testing (Free)
https://www.youtube.com/watch?v=OvCLwh5vN8g&list=PLBw1ubD1J1Ujws5XLs7BGJqQkQVpJtmBJ
🔹 Agile Testing Series (Free)
https://www.youtube.com/playlist?list=PLBw1ubD1J1Uif-cFY6BJRbjc3Ah9bKpSd
🔹 Animated Software Testing Videos (Free)
https://www.youtube.com/watch?v=jRcsuCrQI_s&list=PLBw1ubD1J1UhnuUX3Kd5OP5r9qaDHie-T
==================================
🔗 CONNECT WITH US
==================================
📺 YouTube → https://www.youtube.com/c/TestingFunda
==================================
⚠️ DISCLAIMER
==================================
All content is for educational purposes only.
#SoftwareTesting #AutomationTesting #Selenium #QA #ManualTesting #Postman #JMeter #Cypress #JavaTesting #APITesting #PerformanceTesting #QAEngineer #SDET #TestingTutorials #FreeTutorials #2026 Close description
