Closed Bug 997662 Opened 6 years ago Closed 6 years ago
Mocha duration time does not accumulate
The mocha duration time doesn't accumulate both on Test Agent App and on console output. We should accumulate the total duration time.
Assignee: nobody → ricky060709
Status: NEW → ASSIGNED
Hardware: x86 → x86_64
Is it really important ? :)
Actually no, but I think it's a small bug I can fix it quickly
Given how absurdly long some of our tests run, I think it's useful for us to accurately capture the time cost of each test. Especially since at least in the integration tests simple errors can easily add 20 or 30 seconds to the total test run. In that case the problem is the setup() costs being hidden, but assuming this is addressed by having the reporter do its own wall-time clock based on the larger phases, both should ideally be fixed at the same time.
Unfortunately, it's difficult to accumulate the mocha duration time unless patching mocha. And why these passes and failures value on HTML are correct that is exactly because the counter is added by mocha's every 'pass' event but duration time will reset by start time in each test. I think it's so hard to overwrite the original mocha HTML reporter.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
But we're moving to TBPL-friendly test runs which use the https://github.com/mozilla-b2g/mocha-tbpl-reporter where we do control the reporter. Although I guess this might just be addressed by modifying that reporter to generate the new structured logging convention output: http://mozbase.readthedocs.org/en/latest/mozlog_structured.html
(In reply to Andrew Sutherland (:asuth) from comment #5) > But we're moving to TBPL-friendly test runs which use the > https://github.com/mozilla-b2g/mocha-tbpl-reporter where we do control the > reporter. > > Although I guess this might just be addressed by modifying that reporter to > generate the new structured logging convention output: > http://mozbase.readthedocs.org/en/latest/mozlog_structured.html Oh, I forgot to explain the part of Test Agent console. As you said, I'm sure we can correct the mocha stats on console output by a custom reporter. But it's different from HTML reporter which used on Test Agent App (Website). Perhaps we could correct our console output by adding mocha-tbpl-reporter to our Test Agent?
You need to log in before you can comment on or make changes to this bug.