Skip to content

Commit

Permalink
Fix timestamp attribute in junit xml report (#3172)
Browse files Browse the repository at this point in the history
There is a bug in the way the `testsuite` element is generated.
### Actual
```
    <testsuite name="MyTest" tests="4" failures="0" errors="0" skipped="0"
               time="0.724">
        timestamp=2024-05-21T18:57:25
        ...
    </testsuite>
```
### Expected
```
    <testsuite name="MyTest" tests="4" failures="0" errors="0" skipped="0"
               time="0.724" timestamp="2024-05-21T18:57:25">
        ...
    </testsuite>
```

The `timestamp` attribute in not an attribute...

Pull request: #3172
  • Loading branch information
romain-gilles-ultra authored May 22, 2024
1 parent 82adb23 commit 85583c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scalalib/src/mill/scalalib/TestModule.scala
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,8 @@ object TestModule {
failures={testResults.count(_.status == Status.Failure.toString).toString}
errors={testResults.count(_.status == Status.Error.toString).toString}
skipped={testResults.count(_.status == Status.Skipped.toString).toString}
time={(testResults.map(_.duration).sum / 1000.0).toString}>
timestamp={timestamp}
time={(testResults.map(_.duration).sum / 1000.0).toString}
timestamp={timestamp}>
{properties}
{cases}
</testsuite>
Expand Down

0 comments on commit 85583c6

Please sign in to comment.