Closed Bug 907621 Opened 11 years ago Closed 11 years ago

[test-agent] in "run all tests" mode, test-agent is running all tests before outputting the results

Categories

(Firefox OS Graveyard :: Gaia::TestAgent, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: julienw, Assigned: julienw)

References

Details

Attachments

(1 file)

(deleted), text/x-github-pull-request
yurenju
: review+
Details
When running all tests (ie: no APP= environment variable), it seems that the test-agent is running the tests before outputting anything. We can see that because we see various console.log (eg: "no icon suite" in the homescreen tests). This does not happen when running only tests for a specific app.
Etienne told me, and I verified, that "APP=communications" triggers the same behavior. Therefore, my new guess is that when the test-agent needs several sandboxes, we have this issue.
I've noticed that it's displayed in the same time in the html reporter in the test-agent webapp and on the console. So this could be a problem with the reporting to mocha from the sandbox.
new finding ! The latest sandbox results are displayed incrementally as expected, but only the previous ones are displayed in one block.
I added some logs in [1]. It seems we get the "end" events for all previous sandboxes only when the _last_ sandbox is starting. However this is probably the end of my quest, I don't exactly understand what is supposed to send the "end" event and why it doesn't work. Hopefully James will either fix this or help me to move forward. I think it is important to fix this because it will help finding the other problems. [1] https://github.com/mozilla-b2g/gaia/blob/master/test_apps/test-agent/common/vendor/test-agent/test-agent.js#L1908
Flags: needinfo?(jlal)
I think this is probably all intentional behavior... we need to do some refactoring of how we handle files in test agent... What I would like to do is: - merge alot of the proxy work into mocha-json-proxy (used in marionette-js-runner) - run single files at a time in their own sandbox - write custom gaia reporter for mocha (or attempt to fix problems with a single existing mocha reporter with multiple test runner results At a high level this would let us deal with tests at a "per-file" level which has a ton of other benefits. This is my long-term vision depending on time constants and other details we might attempt a smaller fix first. Keeping the needinfo so I am reminded of this but hopefully this is enough context for the moment.
Flags: needinfo?(jlal)
I put back the needinfo because you actually removed it ;)
Flags: needinfo?(jlal)
Component: Gaia → Gaia::TestAgent
Attached file github PR (deleted) —
This was not easy to spot, but the patch is a lot simpler than what I anticipated. With this change, we now see the tests as they're run, instead of waiting for the last one. I tried also running from the UI tests from different apps, this looks to work as expected ;) Here is the Gaia PR with these changes so that we see that everything still works: https://github.com/mozilla-b2g/gaia/pull/16344 Yuren, James, the first to review is the winner ;) This will be very useful to understand why the test-agent does not finish sometimes, next step is to turn on the Spec reporter instead of Min.
Assignee: nobody → felash
Attachment #8376850 - Flags: review?(yurenju.mozilla)
Attachment #8376850 - Flags: review?(jlal)
Flags: needinfo?(jlal)
Comment on attachment 8376850 [details] github PR now I see output from console for |make test-agent-test| when running tests, great job Julien!!
Attachment #8376850 - Flags: review?(yurenju.mozilla) → review+
Attachment #8376850 - Flags: review?(jlal)
master: 05fe37782169c114ca373394036960a712063590
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Depends on: 973665
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: