jemishgopani / wdio-json-reporter

A WebdriverIO plugin. Report results in json format. http://webdriver.io
13 stars 32 forks source link

Merge Results - incorrect end timestamp #33

Closed dragancla closed 4 years ago

dragancla commented 5 years ago

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

dragancla commented 5 years ago

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

dragancla commented 4 years ago

Thanks 👍