Open
Bug 1309497
Opened 8 years ago
Updated 2 years ago
Generating network event stub for enzyme unit testing
Categories
(DevTools :: Netmonitor, defect, P4)
DevTools
Netmonitor
Tracking
(firefox52 affected)
NEW
Tracking | Status | |
---|---|---|
firefox52 | --- | affected |
People
(Reporter: rickychien, Unassigned)
References
(Blocks 3 open bugs)
Details
(Whiteboard: [netmonitor-reserve])
Follow-up for bug 1309496. Most of the enzyme unit testing for netmonitor needs to receive networkEvent and netoworkEventUpdate packets from actor.
Unit testing must depend on these event stubs to verify rendering result.
Updated•8 years ago
|
Flags: qe-verify?
Whiteboard: [netmonitor]
Comment 1•8 years ago
|
||
Ricky, how the Webconsole does this? Do you have any pointers to the code base so, we can look and get some inspiration?
Honza
Flags: needinfo?(rchien)
Reporter | ||
Comment 3•8 years ago
|
||
I know it's tricky so far we run mochitest by ./mach test <a mochitest file> [1] to generate a stub file [2].
The idea is to capture any events you want while running mochitest and save these events to somewhere, so the enzyme test cases are able to import them and get the stub packet by given key [3].
[1] https://dxr.mozilla.org/mozilla-central/source/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/browser_webconsole_update_stubs_network_event.js
[2] https://dxr.mozilla.org/mozilla-central/source/devtools/client/webconsole/new-console-output/test/fixtures/stubs/networkEvent.js
[3] https://dxr.mozilla.org/mozilla-central/source//devtools/client/webconsole/new-console-output/test/components/network-event-message.test.js#25
Flags: needinfo?(rchien)
Updated•8 years ago
|
Priority: -- → P2
Updated•8 years ago
|
Priority: P2 → P3
Whiteboard: [netmonitor] → [netmonitor-reserve]
Updated•8 years ago
|
Priority: P3 → P4
Updated•7 years ago
|
Product: Firefox → DevTools
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•