Open Bug 1825875 Opened 1 year ago Updated 9 months ago

Write tests for old and new migration wizard event telemetry

Categories

(Firefox :: Migration, task, P3)

task

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.

Severity: -- → N/A
Priority: -- → P3
Assignee: nobody → nolan.ishii

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!

Attachment #9328690 - Attachment description: WIP: Bug 1825875 - Write tests for old and new migration wizard event telemetry. r=mconley → Bug 1825875 - Write tests for old and new migration wizard event telemetry. r=mconley
Attachment #9328690 - Attachment description: Bug 1825875 - Write tests for old and new migration wizard event telemetry. r=mconley → WIP: Bug 1825875 - Write tests for old and new migration wizard event telemetry. r=mconley

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: nolan.ishii → nobody
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: