Introduce reportTestTimestamp option and include timestamp for test sets and test cases#3261
Conversation
|
Hi @olamy, this is the PR we discussed a couple of weeks ago about the test timestamp reporting, please take a look when ur free. |
elharo
left a comment
There was a problem hiding this comment.
Sounds good, but major new features should start with an issue, not a PR
elharo
left a comment
There was a problem hiding this comment.
are any user doc updates required for this?
...efire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java
Show resolved
Hide resolved
...efire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java
Outdated
Show resolved
Hide resolved
|
Thanks. You need to include the issue in the PR description. |
|
Can you add a "how to use" section? @kevinnammour |
...in/java/org/apache/maven/plugin/surefire/extensions/junit5/JUnit5Xml30StatelessReporter.java
Show resolved
Hide resolved
… inline toIsoInstant logic
Hello, it can be activated through the |
...efire-common/src/main/java/org/apache/maven/plugin/surefire/report/StatelessXmlReporter.java
Show resolved
Hide resolved
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/TestSetStats.java
Outdated
Show resolved
Hide resolved
maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/report/TestSetStats.java
Outdated
Show resolved
Hide resolved
surefire-its/src/test/resources/enable-timestamp-element/src/test/java/TestA.java
Outdated
Show resolved
Hide resolved
…ehavior in dummy tests
...ava/org/apache/maven/plugin/surefire/extensions/DefaultStatelessReportMojoConfiguration.java
Show resolved
Hide resolved
|
Thanks guys, let me know if there's anything else needed from my side. |
|
@kevinnammour I was on my way merging it but we probably need to update the xsd files? https://github.com/apache/maven-surefire/blob/master/maven-surefire-plugin/src/site/resources/xsd/surefire-test-report.xsd Can you do it now or in a follow-up PR? because I will merge a big PR today so I wanted to merge yours first and resolve conflicts rather than force you to do it. |
I can do it now. Thanks. |
…ets and test cases (apache#3261) * Introduce reportTestTimestamp option and include start timestamps in XML reports * Explicitly state deprecation reason of StatelessXmlReporter ctor, and inline toIsoInstant logic * Make test/testset startAt getters package private, and remove sleep behavior in dummy tests * Adapt surefire test report format to include timestamp field
|
@kevinnammour thanks for your work and your patience ;) |
…ets and test cases (#3261) (#3302) * Introduce reportTestTimestamp option and include start timestamps in XML reports * Explicitly state deprecation reason of StatelessXmlReporter ctor, and inline toIsoInstant logic * Make test/testset startAt getters package private, and remove sleep behavior in dummy tests * Adapt surefire test report format to include timestamp field Co-authored-by: Kevin Nammour <[email protected]>
New feature, improvement proposal
Issue
Enhacement issue: Add Test Start Timestamp to Surefire XML Reports #3249
Summary
Introduce an explicit test timestamp field in XML reports at both the testsuite and testcase levels. This enhancement will allow each test suite and individual test case to record the precise processing time of execution.
The addition of test timestamps makes it easier to correlate test execution events with external, time-based system metrics such as CPU usage, memory consumption, I/O activity, JVM metrics, and other system-level monitoring data.
The timestamp:
reportTestTimestampis set to trueMotivation & Use Cases
This makes it easier to correlate test execution with time-based external signals, such as:
Report Example
Following this checklist to help us incorporate your contribution quickly and easily:
mvn clean installto make sure basic checks pass. A more thorough check willbe performed on your pull request automatically.
mvn -Prun-its clean install).If your pull request is about ~20 lines of code you don't need to sign an Individual Contributor License Agreement if you are unsure please ask on the developers list.
To make clear that you license your contribution under the Apache License Version 2.0, January 2004 you have to acknowledge this by using the following check-box.