Skip to content

Commit c5c8f02

Browse files
authored
Add files via upload
1 parent faa06e8 commit c5c8f02

20 files changed

+2152
-1
lines changed

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,32 @@
1-
# playwright-reporters-demo
1+
---
2+
# Playwright Reporting Demo Setup Guide
3+
---
4+
5+
## Features of this framework
6+
* Playwright Reporting
7+
* [Reporting: Allure](https://www.npmjs.com/package/allure-playwright)
8+
* [Cloud Integration: LambdaTest](http://www.lambdatest.com?fp_ref=md-moeen-ajaz40)
9+
10+
## Getting started
11+
12+
### Pre-requisites
13+
* Download and install Node.js
14+
* Download and install any Text Editor like Visual Code/Sublime/Brackets
15+
16+
### Setup Visual Code
17+
* Install GitLens Extension from the Marketplace: `GitLens — Git supercharged by GitKraken https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens`
18+
* Go to Visual Code Preference > Setting and search `formatOnSave` and enable/ON it.
19+
20+
### Setup Scripts
21+
* Clone the repository into a folder
22+
* Go to Project root directory and install Dependency: `npm install`
23+
* All the dependencies from package.json would be installed in node_modules folder.
24+
25+
## How to Run Test Locally
26+
* Go to the Project root directory and run command: `npm test`
27+
28+
## How to view default Playwright HTML report
29+
* Go to the Project root directory: `./playwright-report/index.html`
30+
31+
### Playwright HTML Test Report
32+
![Playwright HTML Test Report](./assets/html-test-report.PNG?raw=true "Playwright HTML Test Report")

assets/browser-config.png

138 KB
Loading

assets/default-reporter-html.png

66.8 KB
Loading

assets/html-test-report.PNG

17 KB
Loading

my-awesome-reporter.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
class MyReporter {
2+
onBegin(config, suite) {
3+
console.log(`======================================================`);
4+
console.log(`Starting the run with ${suite.allTests().length} tests`);
5+
console.log(`======================================================`);
6+
}
7+
8+
onTestBegin(test) {
9+
console.log(`Starting test ${test.title}`);
10+
}
11+
12+
onTestEnd(test, result) {
13+
console.log(`Finished test ${test.title}: ${result.status}`);
14+
}
15+
16+
onEnd(result) {
17+
console.log(`======================================================`);
18+
console.log(`Finished the run: ${result.status}`);
19+
console.log(`======================================================`);
20+
}
21+
}
22+
23+
module.exports = MyReporter;

0 commit comments

Comments
 (0)