-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 |
@@ -176,7 +176,9 @@ object ReportManager { | |||
|
|||
val oldTestResult = GcStorage.downloadJunitXml(args) | |||
|
|||
newTestResult.mergeTestTimes(oldTestResult) | |||
if (args.useLegacyJUnitResult) { | |||
newTestResult.mergeTestTimes(oldTestResult) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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