Skip to content
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

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

Closed
talevi83 opened this issue May 19, 2019 · 1 comment
Closed

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

talevi83 opened this issue May 19, 2019 · 1 comment

Comments

@talevi83
Copy link
Contributor

talevi83 commented May 19, 2019

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.

talevi83 added a commit to talevi83/difido-reports that referenced this issue May 19, 2019
@itaiag
Copy link
Contributor

itaiag commented May 21, 2019

Thank you for the pull request!

Always exciting to see contributions from the community.

@itaiag itaiag added this to the 2.3.00 milestone May 30, 2019
@itaiag itaiag closed this as completed May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants