Skip to content

Commit 604e868

Browse files
committed
Read Me
1 parent d0e260e commit 604e868

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

README.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ npm install
9999

100100
1. For Browser Configuration, change required parameters in "playwright.config.ts".
101101
2. For execution entire test suite on all available browsers simultaneously execute:
102-
102+
103103
```JS
104104
npm run test
105105
```
@@ -127,3 +127,38 @@ npm run test:serial
127127
```JS
128128
npm run test:api
129129
```
130+
131+
7. For recording test scripts :
132+
133+
```JS
134+
npm run test:record
135+
```
136+
137+
8. To produce and visually compare screenshots execute below command. On first execution reference screenshot will be generated for comparision with subsequent runs.
138+
139+
```JS
140+
npm run test:visual
141+
```
142+
143+
9. For emulating test cases on any device, in "playwright.config.ts", under device section provide desired device name and execute :
144+
145+
```JS
146+
npm run test:device
147+
```
148+
149+
10. For Report generation execute :
150+
151+
```JS
152+
npm run test:report
153+
```
154+
155+
11. For debugging test cases add debug points, the press CNTRL+SHIFT+P and type "debug:debug npm script", on the edit box select desired script.
156+
12. Screenshots, Videos and Trace files will be generated in test-results folder.
157+
13. To change your username go to `testData.json` and provide value against `username`
158+
14. To change password, go to `lib/WebActions` in `decipherPassword()` uncomment `ENCRYPT` code block and replace `password` with your password, execute the test case, Encrypted password will be printed on your console . Copy Encrypted password in `testData.json` against `password` field. You can comment Encrypt bloack ater this.
159+
15. For executing Postgres DB test case, navigate to `testData.json` and provide values for `dbUsername, dbPassword, dbServerName, dbPort, dbName`. Refer to `tests/DB.test.ts` for connecting to DB and Firing a Query.
160+
16. For viewing trace files, go to folder where `trace.zip` is generated and execute :
161+
162+
```JS
163+
npx playwright show-trace trace.zip
164+
```

lib/WebActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export class WebActions {
1818
async decipherPassword(): Promise<string> {
1919
const key = `SECRET`;
2020
//ENCRYPT
21-
// const cipher = CryptoJS.AES.encrypt('demouser',key);
21+
// const cipher = CryptoJS.AES.encrypt('password',key);
2222
// console.log(cipher.toString());
2323
return CryptoJS.AES.decrypt(loginData.password, key).toString(CryptoJS.enc.Utf8);
2424
}

0 commit comments

Comments
 (0)