Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-681

Add timestamp when each test is run in the generated report

    XMLWordPrintableJSON

Details

    Description

      We run integration tests using maven-surefire-plugin by filtering on the names (they end with *TestIntegration). These tests access a JBoss server, and leave log entires in the server log. When a test fail, it would be great to have a timestamp on each test in the test report from surefire so that it can be matched against what is happening in the server log. This is especially true when you have a lot of integration tests running and you can't directly spot the server log entries related to the failing test. By adding a timestamp to the tests it would make it MUCH easier to figure out the server log dependent calls.

      Current output:

      -------------------------------------------------------------------------------
      Test set: com.tracetracker.gqi3.QueryRestTestIntegration
      -------------------------------------------------------------------------------
      Tests run: 17, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 7.546 sec <<< FAILURE!
      testSimpleEventQueryRecordTime(com.tracetracker.gqi3.QueryRestTestIntegration)  Time elapsed: 0.031 sec  <<< FAILURE!
      junit.framework.AssertionFailedError: List of recordTime should not be empty
              at junit.framework.Assert.fail(Assert.java:47)
              at junit.framework.Assert.assertTrue(Assert.java:20)
              at com.tracetracker.gqi3.QueryRestTestIntegration.testSimpleEventQueryRecordTime(QueryRestTestIntegration.java:283)
      

      Each failing test should have the timestamp added to the start of the line.

      Attachments

        1. image-2020-02-04-09-38-40-174.png
          26 kB
          finn desolace
        2. image-2020-02-04-09-42-25-382.png
          52 kB
          finn desolace

        Activity

          People

            Unassigned Unassigned
            viggo.navarsete Viggo Navarsete
            Votes:
            2 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: