Skip to content

Commit 88aea71

Browse files
committed
Updated the format in README.md file
1 parent e9e59fb commit 88aea71

File tree

1 file changed

+58
-72
lines changed

1 file changed

+58
-72
lines changed

β€ŽREADME.md

Lines changed: 58 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -30,64 +30,68 @@ Supports cross-browser testing, rich reporting with **Allure**, Dockerized execu
3030
- βœ… GitHub Pages publishing for Allure reports
3131

3232
---
33-
🐞 Debugging Playwright Tests in VS Code
34-
You can debug your Playwright tests using VS Code's built-in debugger and the provided launch.json configuration.
35-
36-
Example launch.json configuration:
37-
38-
```json
39-
{
40-
"type": "node",
41-
"request": "launch",
42-
"name": "Debug Playwright Test",
43-
"program": "${workspaceFolder}/node_modules/@playwright/test/cli.js",
44-
"args": [
45-
"test",
46-
"--headed",
47-
"--project=chromium"
48-
],
49-
"env": {
50-
"TAG": "@smoke",
51-
"BROWSER": "chromium",
52-
"WORKERS": "1",
53-
"RETRIES": "1",
54-
"TEST_ENV": "qa1"
55-
},
56-
"console": "integratedTerminal",
57-
"internalConsoleOptions": "openOnSessionStart"
58-
}
59-
```
60-
61-
How to Use
62-
Open your project in VS Code.
63-
Set breakpoints in your test or page files.
64-
Go to the Run & Debug panel (left sidebar).
65-
Select Debug Playwright Test from the dropdown.
66-
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.
37+
Example launch.json configuration:
38+
39+
```json
40+
{
41+
"type": "node",
42+
"request": "launch",
43+
"name": "Debug Playwright Test",
44+
"program": "${workspaceFolder}/node_modules/@playwright/test/cli.js",
45+
"args": ["test", "--headed", "--project=chromium"],
46+
"env": {
47+
"TAG": "@smoke",
48+
"BROWSER": "chromium",
49+
"WORKERS": "1",
50+
"RETRIES": "1",
51+
"TEST_ENV": "qa1"
52+
},
53+
"console": "integratedTerminal",
54+
"internalConsoleOptions": "openOnSessionStart"
55+
}
56+
```
57+
58+
### ▢️ How to Use
59+
60+
Open your project in VS Code.
61+
Set breakpoints in your test or page files.
62+
Go to the Run & Debug panel (left sidebar).
63+
Select Debug Playwright Test from the dropdown.
64+
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+
7678
To run tests in debug mode with your environment settings, use:
7779
npmΒ runΒ test:env:debugΒ --Β [test-file-or-pattern]Β --debug
78-
test:env:debug is the script defined under package.json file
79-
This command sets the following variables:
80-
TAG='@smoke' BROWSER='chromium' WORKERS=2 RETRIES=1 TEST_ENV='qa1'
81-
The --debug flag opens the Playwright Inspector for interactive debugging.
82-
Example
83-
npmΒ runΒ test:env:debugΒ --Β tests/login.spec.tsΒ --debug
84-
What Happens
80+
test:env:debug is the script defined under package.json file
81+
This command sets the following variables:
82+
TAG='@smoke' BROWSER='chromium' WORKERS=2 RETRIES=1 TEST_ENV='qa1'
83+
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
8587
The script runs Playwright tests with your specified environment.
8688
The Playwright Inspector UI will open, allowing you to step through your tests, inspect selectors, and interact with the browser.
8789
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+
---
9195

9296
## πŸ§ͺ Running Tests Locally
9397

@@ -139,23 +143,6 @@ docker run --rm -v $(pwd)/allure-report:/app/allure-report my-playwright-runner
139143
}
140144
```
141145

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-
159146
## βœ… GitHub Actions CI/CD
160147

161148
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.
169156
### πŸ“ Workflow Location
170157

171158
.github/workflows/playwright.yml
172-
```
173159

174160
### 🐳 Docker in CI
175161

@@ -192,7 +178,7 @@ This project uses **GitHub Actions** to automate test execution and reporting.
192178
> πŸš€ Automated Playwright tests with integrated Allure reporting and GitHub Pages hosting.
193179
194180
- 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/).
196182

197183
---
198184

0 commit comments

Comments
Β (0)