Write tests for old and new migration wizard event telemetry
Categories
(Firefox :: Migration, task, P3)
Tracking
()
People
(Reporter: mconley, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Bug 1824786 added event telemetry for both the old and new migration wizards. We should write automated tests to keep those working. This bug is for doing that.
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Comment 1•2 years ago
|
||
Hey nishii,
So what we're going to need to do here is write tests that will instrument both the old and new wizards separately, to walk them through their various states, and ensure that we get the expected events.
This is going to be a bit tricky. What I advise you do is to start with the new migration wizard first, because we've got more testing tools and helper functions for that. Then, we're going to want to both import and use TelemetryTestUtils
- specifically, the assertEvents
method here: https://searchfox.org/mozilla-central/rev/ad732108b073742d7324f998c085f459674a6846/toolkit/components/telemetry/tests/utils/TelemetryTestUtils.sys.mjs#161-187
to test that the events that we're recording are being properly recorded.
Take a look at some example usage of assertEvents
using searchfox to get a feel for what we're trying to do here, and also check out the helper functions in browser/components/migration/tests/browser/head.js
to see what can be done easily. Then I recommend creating a new test like this:
./mach addtest browser/components/migration/tests/browser/browser_event_telemetry.js
hg add browser/components/migration/tests/browser/browser_event_telemetry.js
and then seeing what you can get done in browser_event_telemetry.js
.
Let us know if you have any questions!
Comment 2•2 years ago
|
||
Updated•1 year ago
|
Updated•1 year ago
|
Comment 3•1 year ago
|
||
The bug assignee is inactive on Bugzilla, so the assignee is being reset.
Description
•