Skip to content

Commit 6aca308

Browse files
Merge pull request #40 from iamcharankumar/fb_logs
Fb logs
2 parents 8304f1e + 9f7a4e0 commit 6aca308

File tree

2 files changed

+41
-4
lines changed

2 files changed

+41
-4
lines changed

README.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,30 @@ modular code. Perfect for those looking to speed up their test automation journe
3434
- headless `-Drunmode=headless`
3535

3636
# CHROME DEVTOOLS PROTOCOL IMPLEMENTATION EXPLAINED
37+
3738
**1. Initialize the CDP Session**
38-
#### What Happens?
39+
40+
#### What Happens?
41+
3942
- You (the test) ask CdpUtils to start monitoring.
4043
- CdpUtils tells CDPSessionHandlerImpl to set things up.
4144
- Playwright provides the tools (CDPSession).
4245

4346
![Initialize_the_CDP_Session](https://github.com/user-attachments/assets/b5016da0-1126-4ca4-ad3f-5dd11ff14779)
4447

4548
**2. Listen for Network Errors**
46-
#### What Happens?
49+
50+
#### What Happens?
51+
4752
- You ask to log errors (e.g., HTTP 404/500).
4853
- The CDPSessionHandlerImpl sets up a listener in the browser.
4954

5055
![Listen_for_Network_Errors](https://github.com/user-attachments/assets/9406c6cd-d4e5-4cfd-b2b8-789922dbc4e1)
51-
56+
5257
**3. Browser Fires an Event**
53-
#### What Happens?
58+
59+
#### What Happens?
60+
5461
- The browser detects a failed request → notifies CDPSessionHandlerImpl.
5562
- The error details are passed back to your test (e.g., to log or retry).
5663

@@ -102,6 +109,25 @@ modular code. Perfect for those looking to speed up their test automation journe
102109
and with the respective groups and thread counts.
103110
The screenshot listeners are configured in "pom.xml" under "< property >" tag.
104111

112+
#### DECLUTTERING MAVEN OUTPUT
113+
114+
- Maven usually floods the console with logs during test execution, making it hard to spot what's important.
115+
A clean, minimal, Node.js-style output for a Java project felt impossible—until I
116+
found this [maven dependency](https://mvnrepository.com/artifact/me.fabriciorby/maven-surefire-junit5-tree-reporter).
117+
- Its purpose is simple: **"What happened to my test cases?"** That’s exactly what it shows—straight to the point, no
118+
clutter.
119+
- By following this [post](https://medium.com/wearewaes/my-journey-to-a-clear-test-output-in-maven-df82fe272249)
120+
by [Fabricio](https://github.com/fabriciorby),
121+
I was able to configure it easily and get the clean output shown below.
122+
- The output works locally and in GitHub Actions as well.
123+
- Huge respect and thanks to the author for this
124+
brilliant [work](https://github.com/fabriciorby/maven-surefire-junit5-tree-reporter?tab=readme-ov-file)!
125+
❤️
126+
127+
**Before the Decluttering**
128+
129+
**After the Decluttering**
130+
105131
## Star History
106132

107133
[![Star History Chart](https://api.star-history.com/svg?repos=iamcharankumar/playwright_test_framework&type=Date)](https://star-history.com/#iamcharankumar/playwright_test_framework&Date)

pom.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@
5252
<artifactId>maven-surefire-plugin</artifactId>
5353
<version>3.5.2</version>
5454
<configuration>
55+
<reportFormat>plain</reportFormat>
56+
<consoleOutputReporter>
57+
<disable>true</disable>
58+
</consoleOutputReporter>
59+
<statelessTestsetInfoReporter
60+
implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5StatelessTestsetInfoTreeReporterUnicode"/>
5561
<parallel>methods</parallel>
5662
<systemPropertyVariables>
5763
<browser>${browser}</browser>
@@ -73,6 +79,11 @@
7379
<artifactId>surefire-testng</artifactId>
7480
<version>3.5.2</version>
7581
</dependency>
82+
<dependency>
83+
<groupId>me.fabriciorby</groupId>
84+
<artifactId>maven-surefire-junit5-tree-reporter</artifactId>
85+
<version>1.4.0</version>
86+
</dependency>
7687
</dependencies>
7788
</plugin>
7889

0 commit comments

Comments
 (0)