Closed Bug 1117110 Opened 9 years ago Closed 8 years ago

Loop Marionette frontend tests should use structured output and have clearer test failures

Categories

(Hello (Loop) :: Client, defect, P4)

defect

Tracking

(Not tracked)

RESOLVED INCOMPLETE
backlog tech-debt

People

(Reporter: standard8, Unassigned)

Details

(Whiteboard: [tech-debt])

From cmanchester on bug 1058038 comment 3:

> If this is providing useful diagnostics, looks good to me. Ongoing
> (under-publicized, I'm realizing) efforts by myself and others mean logging
> "TEST-UNEXPECTED-FAIL" is no longer the primary means for a test harness to
> communicate failure. Test harnesses are being converted to log a raw data
> format for test results that is serialized as JSON and can be made useful to
> a range of consumers. The formatter used by automation translates a failed
> test or error into a "TEST-UNEXPECTED" prefixed line for compatibility with
> tools like tbpl, but the default formatter used by mach does not. You can
> pass "--log-tbpl -" to mach to see how failure output would be formatted in
> this context.
backlog: --- → tech-debt
Priority: -- → P4
Update. I've found out a bit of background info to this. Marionette already has capability for structured logging. We need to change our code to use that. For example, this is where it logs js tests:

https://hg.mozilla.org/mozilla-central/file/7f343964210b/testing/marionette/client/marionette/marionette_test.py#l570

Whilst we're here we also want to improve our test failure messages. They currently look like:

23:30:11 ERROR - TEST-UNEXPECTED-FAIL | test_desktop_all.py TestDesktopUnits.test_units | AssertionError: build/tests/marionette/tests/browser/components/loop/test/desktop-local/index.html: 1 failure(s) encountered:
23:30:11 ERROR - TEST-UNEXPECTED-FAIL | index.html | should show the gravatars promo box - timeout of 2000ms exceeded. Ensure the done() callback is being called in this test.
23:30:11 INFO - timeout of 2000ms exceeded. Ensure the done() callback is being called in this test. 

They should look more like:

23:30:11 ERROR - TEST-UNEXPECTED-FAIL | test_desktop_all.py TestDesktopUnits.test_units | should show the gravatars promo box - timeout of 2000ms exceeded
<additional failure information>

Given comment 0, the TEST-UNEXPECTED may be obsolete now. The important thing here is the file which failed and the precise test are on the first line. Anything else can follow that.
Summary: Loop Marionette frontend tests should use JSON based output → Loop Marionette frontend tests should use structured output and have clearer test failures
Rank: 45
Support for Hello/Loop has been discontinued.

https://support.mozilla.org/kb/hello-status

Hence closing the old bugs. Thank you for your support.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.