Skip to content

Add Test Start Timestamp to Surefire XML Reports #3249

@kevinnammour

Description

@kevinnammour

New feature, improvement proposal

Summary

Add an explicit start timestamp field to the Surefire XML reports at both:

  • testsuite level
  • testcase level

The timestamp should represent the exact start time of execution for each test suite and each individual test case.

Problem Statement

Currently, Surefire XML reports provide:

  • test duration (time)
  • counts (tests, failures, skipped, etc.)

However, they do not expose the start time of:

  • a test suite
  • an individual test case

This makes it difficult to correlate test execution with time-based external signals, such as:

  • CPU usage
  • memory consumption
  • I/O pressure
  • JVM metrics
  • system-level monitoring data

Proposed Enhancement

testsuite
    name="com.example.MyTest"
    timestamp="2026-01-29T06:41:12.345Z"
    time="12.345">
<testcase
    name="shouldProcessData"
    classname="com.example.MyTest"
    timestamp="2026-01-29T06:41:15.123Z"
    time="0.456">
.......
  • Timestamp should represent test execution start time
  • ISO‑8601 format (UTC) is recommended for interoperability
  • Backward compatible: additive, optional field

Motivation & Use Cases
Fine‑Grained Performance & Resource Monitoring

Current Workaround
At the moment, we are using a custom JUnit listener to capture test start times and emit them separately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions