You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Click the green play button (▶️) to start debugging.
67
-
The browser will open in headed mode, and you can step through your code, inspect variables, and use all VS Code debugging features.
68
-
69
-
You can customize the environment variables and arguments as needed for your test run.
70
-
For more details, see VS Code Debugging Documentation.
71
-
72
-
🐞 Debugging Tests with Playwright Debugger
73
-
You can debug your Playwright tests using the built-in Playwright Inspector or VS Code debugger. The project provides a convenient script for running tests in debug mode with environment variables pre-set.
74
-
75
-
Using the Debug Script
33
+
34
+
## 🐞 Debugging Playwright Tests in VS Code
35
+
36
+
You can debug your Playwright tests using VS Code's built-in debugger and the provided launch.json configuration.
Click the green play button (▶️) to start debugging.
65
+
The browser will open in headed mode, and you can step through your code, inspect variables, and use all VS Code debugging features.
66
+
67
+
You can customize the environment variables and arguments as needed for your test run.
68
+
For more details, see VS Code Debugging Documentation.
69
+
70
+
---
71
+
72
+
## 🐞 Debugging Tests with Playwright Debugger
73
+
74
+
You can debug your Playwright tests using the built-in Playwright Inspector or VS Code debugger. The project provides a convenient script for running tests in debug mode with environment variables pre-set.
75
+
76
+
### Using the Debug Script
77
+
76
78
To run tests in debug mode with your environment settings, use:
77
79
npm run test:env:debug -- [test-file-or-pattern] --debug
78
-
test:env:debug is the script defined under package.json file
The --debug flag opens the Playwright Inspector for interactive debugging.
84
+
Example
85
+
npm run test:env:debug -- tests/login.spec.ts --debug
86
+
What Happens
85
87
The script runs Playwright tests with your specified environment.
86
88
The Playwright Inspector UI will open, allowing you to step through your tests, inspect selectors, and interact with the browser.
87
89
Tips
88
-
You can pass any test file or pattern after -- to target specific tests.
89
-
Use breakpoints in your test code or add await page.pause() to pause execution at a specific point.
90
-
Add this section to your README.md to help contributors debug tests using your custom script and Playwright’s debugging tools. Let me know if you want this inserted automatically!
90
+
You can pass any test file or pattern after -- to target specific tests.
91
+
Use breakpoints in your test code or add await page.pause() to pause execution at a specific point.
92
+
Add this section to your README.md to help contributors debug tests using your custom script and Playwright’s debugging tools. Let me know if you want this inserted automatically!
93
+
94
+
---
91
95
92
96
## 🧪 Running Tests Locally
93
97
@@ -139,23 +143,6 @@ docker run --rm -v $(pwd)/allure-report:/app/allure-report my-playwright-runner
139
143
}
140
144
```
141
145
142
-
---
143
-
144
-
## 📂 Project Structure
145
-
146
-
e2e-playwright-framework/
147
-
├── tests/ # Test specs
148
-
├── pages/ # Page Object Models
149
-
├── utils/ # Custom utilities
150
-
├── storage/ # Session files
151
-
├── allure-results/ # Allure raw data
152
-
├── allure-report/ # Allure HTML reports
153
-
├── playwright.config.ts # Playwright test config
154
-
├── DockerFile.playwright # Dockerfile for CI/CD
155
-
├── .github/workflows/ # GitHub Actions workflows
156
-
157
-
158
-
159
146
## ✅ GitHub Actions CI/CD
160
147
161
148
This project uses **GitHub Actions** to automate test execution and reporting.
@@ -169,7 +156,6 @@ This project uses **GitHub Actions** to automate test execution and reporting.
169
156
### 📁 Workflow Location
170
157
171
158
.github/workflows/playwright.yml
172
-
```
173
159
174
160
### 🐳 Docker in CI
175
161
@@ -192,7 +178,7 @@ This project uses **GitHub Actions** to automate test execution and reporting.
192
178
> 🚀 Automated Playwright tests with integrated Allure reporting and GitHub Pages hosting.
193
179
194
180
- Allure HTML reports are published to GitHub Pages after each CI run.
195
-
- Access the latest report [here](https://ramjangatisetty.github.io/e2e-playwright-typescript-framework-template/).
181
+
- Access the latest Allure report [on GitHub Pages](https://ramjangatisetty.github.io/e2e-playwright-typescript-framework-template/).
0 commit comments