Write tests for WebIDE's Monitor

RESOLVED WONTFIX

Status

()

Firefox
Developer Tools: WebIDE
P3
normal
RESOLVED WONTFIX
4 years ago
2 years ago

People

(Reporter: janx, Assigned: janx)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [btpp-backlog])

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

4 years ago
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...).
(Assignee)

Comment 1

4 years ago
Created attachment 8478256 [details] [diff] [review]
Write tests for WebIDE's Monitor.

Work in progress.
(Assignee)

Comment 2

4 years ago
Created attachment 8486511 [details] [diff] [review]
Write tests for WebIDE's Monitor.

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
(Assignee)

Comment 3

4 years ago
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]
(Assignee)

Comment 6

2 years ago
The Monitor's main features were taken over by the new Performance tools, so no point in addressing this now.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.