jemishgopani/wdio-json-reporter

Merge Results - incorrect end timestamp

Closed this issue · 2 comments

Due to using the first test as a 'template' to format the following results, the start timestamp is correct but the end timestamp actually equals the time the first test execution finished, not the time the entire suite of tests finished.

As an example, here's a (redacted) log that shows that the end timestamp at the beginning of the file (2019-07-16T09:32:39.626Z) is different from the end timestamp of the last test executed (2019-07-16T09:35:45.974Z)

wdio-merged-results.log

I fixed it with:

mergedResults.suites.forEach((suite) => { 
    mergedResults.end = (suite.end > mergedResults.end ? suite.end : mergedResults.end)
});

before the return mergedResults in the mergeData function, but I'd rather not make a PR

Thanks 👍