Add overhead time to junit test case report#684
Conversation
|
awesome! |
|
Hey @bootstraponline there is one think to consider here. |
|
Second thing is that test suites names in junit report may not be unique so method |
Codecov Report
@@ Coverage Diff @@
## master #684 +/- ##
============================================
+ Coverage 77.30% 77.41% +0.10%
- Complexity 624 626 +2
============================================
Files 109 109
Lines 2529 2541 +12
Branches 360 361 +1
============================================
+ Hits 1955 1967 +12
Misses 345 345
Partials 229 229 |
|
|
||
| newTestResult.mergeTestTimes(oldTestResult) | ||
| if (args.useLegacyJUnitResult) { | ||
| newTestResult.mergeTestTimes(oldTestResult) |
There was a problem hiding this comment.
I've decided to omit this call when not useLegacyJUnitResult cause new junit result (from api) does not favor success over failure nor error, so we don't need to override failed test cases times.
|
|
||
| private fun List<TestCase>.sumTime(): Double = this | ||
| .map { it.elapsedTime.millis() } | ||
| .reduce { acc, d -> acc + d } |
There was a problem hiding this comment.
Hey! I think we can simplify this with this.sumByDouble { it.elapsedTime.millis() }. Let me know what do you think. Thanks!
2b3ab46 to
630f2b7
Compare
Fixes #557
Checklist