@@ -59,54 +59,74 @@ _☝ If you liked the project, please give a ⭐ on [GitHub](https://github.com/
5959## Getting Started
6060
6161## Project Structure
62+ ``` text
63+ playwright-framework-template/
64+ ├── .github/workflows/ # GitHub Actions CI/CD
65+ ├── src/
66+ | └── helper/ # Helpers
67+ | | ├── api/apiHelper.ts # API Helper
68+ | | ├── load/loadHelper.ts # Load testing Helper
69+ | | ├── mobile/mobileHelper.ts # Mobile action Helper
70+ | | └── web/webHelper.ts # Web action Helper
71+ | └── utils/ # Utilities
72+ | | ├── config/ # config files
73+ | | ├── error/ # Centralized error manager
74+ | | ├── reader/ # JSON/Excel reader Helper
75+ | | ├── report/ # Custom report manager
76+ | | └── other/ # Har Analyzer
77+ | └── globals/ # Global setup/teardown/healthcheck scripts
78+ ├── tests/
79+ | ├── fixtures/ # Custom test fixtures
80+ | ├── api/ # API Integration tests
81+ | | └── example/ # example api tests
82+ | ├── e2e/ # E2E tets
83+ | | └── example/ # example e2e tests
84+ | ├── load/ # Load testing
85+ | | └── example/ # example load tests
86+ | ├── resources/ # resource files
87+ | ├── web/ # browser tests
88+ | | └── example/ # example web tests
89+ | └── mobile/ # Mobile tests
90+ | └── example/ # example mobile tests
91+ ├── Dockerfile # Dockerfile
92+ ├── docker-compose.yml # docker-compose.yml
93+ ├── .env # environment variables
94+ ├── .env.example # environment variables example
95+ ├── .gitignore # git ignore
96+ ├── .prettierrc # prettier config
97+ ├── .eslintrc.json # eslint config
98+ ├── package.json # package.json
99+ ├── playwright.config.ts # playwright config
100+ ├── README.md # README.md
101+ └── tsconfig.json # tsconfig.json
62102
63- - ` src `
64- - ` helper `
65- - ` /api/apiHelper.ts ` contains functions for making HTTP requests
66- - ` /load/loadHelper.ts ` contains functions generating load on UI/Api
67- - ` /mobile/mobileHelper.ts ` contains functions for interacting with mobile apps
68- - ` /web/webHelper.ts ` contains functions for interacting with browser
69- - ` tests ` contains utility functions
70- - ` api ` place to write api tests
71- - ` example ` contains example api tests using this framework
72- - ` web ` place to write web tests
73- - ` example ` contains example api tests using this framework
74- - ` load ` place to write load tests
75- - ` example ` contains example api tests using this framework
76- - ` mobile ` place to write mobile tests
77- - ` example ` contains example api tests using this framework
78- - ` utils ` contains utility functions
79- - ` config ` contains config files
80- - ` report ` contains report function files
81- - ` dataStore.js ` acts as a in-memory data store. It is used to save data that needs to be shared between different test case
82- - ` test-results ` contains test results
83- - ` har ` contains har file generated by playwright tests
84- - ` logs ` contains logs
85103
86104### Prerequisite
87105
88106- `nodejs`: Download and install Node JS from
89107 > `https://nodejs.org/en/download`
90- - ` Visual Studio Code/Aqua/IntelliJ ` : Download and install code editor
108+ - `Visual Studio Code/WindSurf/Cursor`: Download and install code editor
109+ - `Git`
91110
92111### Installation
93112
94113- clone the repo using below URL
95114
96115 > `https://github.com/abhaybharti/playwright-framework-template.git`
97116
98- - Navigate to folder and install npm packages using:
117+ - Navigate to folder and install dependencies
99118
100119 > `npm install`
101120
102- - For first time installation use below command to download required browsers:
121+ - For first time installation use below command to download & install required browsers:
103122
104123 > `npx playwright install`
105124
106125- In case you want to do fresh setup of playwright
107126 - Create a folder & run command `npm init playwright@latest`
108127 - select `TypeScript` & select default for other options
109128
129+
110130## Usage
111131
112132- For browser configuration, change required parameters in playwright.config.ts
0 commit comments