Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/teleivo/maven-surefire-test-durations
Analysis of Maven Surefire Test Report Timings
https://github.com/teleivo/maven-surefire-test-durations
maven surefire-plugin
Last synced: 1 day ago
JSON representation
Analysis of Maven Surefire Test Report Timings
- Host: GitHub
- URL: https://github.com/teleivo/maven-surefire-test-durations
- Owner: teleivo
- License: mit
- Created: 2021-11-05T06:03:18.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-05T12:31:19.000Z (about 3 years ago)
- Last Synced: 2024-11-08T18:52:59.069Z (about 2 months ago)
- Topics: maven, surefire-plugin
- Language: Java
- Homepage:
- Size: 272 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Maven Surefire Plugin Test Durations
This repo is solely for experimentation and investigation of the test durations
reported by the
[Maven Surefire Plugin](https://maven.apache.org/surefire/maven-surefire-plugin/).## What I learned
I wrote the simplest test
[AppTest](./src/test/java/com/github/teleivo/AppTest.java) using
`Thread.sleep()` to clearly provoke timings in the report that can be
attributed back to the testcase or suite.Surefire reports a `time` attribute for the
* test suite (class) which includes the time it takes to run `@BeforeClass`
methods and the total of all test cases
* test case (method) which includes the time it takes to run `@Before` methods
and the time it takes to run the testSee
[AppTest.xml](./target/surefire-reports/TEST-com.github.teleivo.AppTest.xml)No surprises here 😋️
IntelliJ suprised me a bit since it did not include the `@BeforeClass` time in
the test duration. See [screenshot.png](./intellij_test_duration_report.png)## Related
If you want to convert Surefire XML reports to CSV for further processing head
over to [maven-surefire-reports-to-csv](https://github.com/teleivo/maven-surefire-reports-to-csv).