Top-Q / difido-reports

This project aims to provide a generic implementation for HTML test reports.
http://top-q.github.io/difido-reports
Apache License 2.0
47 stars 31 forks source link

Tests duration in "Test Execution Report"/Summary Table #224

Closed talevi83 closed 5 years ago

talevi83 commented 5 years ago

When the whole scenario runtime took over 24H, The test duration time in the dashboard of the execution report is incorrect. It means that the duration time is resetting every 24H and the time duration is presented actually like totalTime modulo 24 = duration time

It looks like in the class: difido-reports/server/difido-server/src/main/java/il/co/topq/report/business/report/ExecutionTableService.java

inside the method "populateRow" there are "if" statements, In the if : "if (header.equalsIgnoreCase(DURATION))" the calculation does not calculate the time for days, but only times under 24H (86400 seconds). for making it right to calculate days, Add this: long durInSec = Math.round(meta.getDuration() / 1000); int days = 0; if(durInSec > 86400) { days = (int)(durInSec / 60 / 60 / 24); . . . row.add(days + "d" + durationHour + "h" + durationMin + "m" + durationSec + "s");

That's all. Thanks.

itaiag commented 5 years ago

Thank you for the pull request!

Always exciting to see contributions from the community.