Closed Bug 1049562 Opened 10 years ago Closed 8 years ago

Write tests for WebIDE's Monitor

Categories

(DevTools Graveyard :: WebIDE, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: janx, Assigned: janx)

References

Details

(Whiteboard: [btpp-backlog])

Attachments

(1 file, 1 obsolete file)

Now that the Monitor has stabilized a bit, and to ensure continued functioning, we should add tests for its stable parts (e.g. the data update API, the creation of graphs...).
Work in progress.
Very basic test to verify that the Monitor UI in WebIDE doesn't break.
The creation and handling of graphs isn't covered yet.
Data collection in the actor is covered by http://dxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/tests/unit/test_monitor_actor.js
The b2g-info parsing will be covered by bug 1049549.
Attachment #8478256 - Attachment is obsolete: true
Comment on attachment 8486511 [details] [diff] [review]
Write tests for WebIDE's Monitor.

Review of attachment 8486511 [details] [diff] [review]:
-----------------------------------------------------------------

I'm not satisfied with the low coverage of this test.

Currently, it's not possible to feed fake data to the Monitor using observer notifications, because nobody is there to listen to them (since there is no Gaia in mochitest-chrome, no monitor actor / front are ever created).

Maybe there are other ways to test the creation/manipulation of graphs, e.g. by feeding fake data using a WebSockets server. This would also cover the WebSockets part.

Alex:
- Do you think the attached test has any value?
- I'll start looking into the WebSockets part, do you know what kind of test I could run with a local WebSocket server, e.g. in python or node.js?
Attachment #8486511 - Flags: feedback?(poirot.alex)
(In reply to Jan Keromnes [:janx] from comment #3)
> Comment on attachment 8486511 [details] [diff] [review]
> - Do you think the attached test has any value?

It is quite limited... but at least it covers the UI to open the monitor...

> - I'll start looking into the WebSockets part, do you know what kind of test
> I could run with a local WebSocket server, e.g. in python or node.js?

It looks like there is something:
  http://mxr.mozilla.org/mozilla-central/source/content/base/test/test_websocket_hello.html?force=1#21
  ws = new WebSocket("ws://mochi.test:8888/tests/content/base/test/file_websocket_hello");
  http://mxr.mozilla.org/mozilla-central/source/content/base/test/mochitest.ini#188
  http://mxr.mozilla.org/mozilla-central/source/content/base/test/file_websocket_hello_wsh.py
Attachment #8486511 - Flags: feedback?(poirot.alex)
Filter on TEAPOT-SPLINES.
Priority: -- → P3
Whiteboard: [btpp-backlog]
The Monitor's main features were taken over by the new Performance tools, so no point in addressing this now.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Product: Firefox → DevTools
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: