Create a TelemetryTestUtils.jsm and add some useful functions to it
Categories
(Toolkit :: Telemetry, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox66 | --- | fixed |
People
(Reporter: standard8, Assigned: standard8)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
| Assignee | ||
Comment 1•7 years ago
|
||
| Assignee | ||
Comment 2•7 years ago
|
||
Comment 3•7 years ago
|
||
I have some feelings about how some of the utility functions are implemented (the canRecordExtended gymnastics for getParentProcessScalars is... well, I know why it's there but I'm unhappy about that and I think we should be able to fix it with some clever defaults), but seeing as this is a rearrangement I'm going to just grumble about it :)
Having a telemetry test utilites module is an excellent idea. It'll help us with our test documentation efforts, it'll make used-only-in-test behaviours easier to isolate and improve, and it should reduce the number of times people need to write the same boilerplate to do what should be simple.
My only comment at this point is that it's in the bare telemetry/tests/ folder instead of in a harness-specific (or, if it's cross-harness, some utils/) folder.
Comment 4•7 years ago
|
||
(In reply to Mark Banner (:standard8) from comment #2)
Alessio, Chris, if you could give me feedback on the attached patch, that'd
be great. Feel free to redirect if I'm asking the wrong people.
Thank you for doing this, it's a great idea! I stand by what Chris said. I left some additional comments on Phabricator.
| Assignee | ||
Comment 5•7 years ago
|
||
(In reply to Chris H-C :chutten from comment #3)
I have some feelings about how some of the utility functions are implemented (the
canRecordExtendedgymnastics forgetParentProcessScalarsis... well, I know why it's there but I'm unhappy about that and I think we should be able to fix it with some clever defaults), but seeing as this is a rearrangement I'm going to just grumble about it :)
Yeah, I definitely agree they aren't perfect. I did think about rewriting them a little, then got into a state where I realised I was over engineering them. My hope is that by having them in a central place they can be improved over time.
My only comment at this point is that it's in the bare telemetry/tests/ folder instead of in a harness-specific (or, if it's cross-harness, some utils/) folder.
It will be available to mochitest and xpcshell-test test suites. So I'll go with adding a utils folder for now.
Regarding migrating other tests, I'll do the rest of browser/modules/test/browser/ in this bug, but will file a follow-up for other places.
Updated•7 years ago
|
| Assignee | ||
Comment 7•7 years ago
|
||
I filed bug 1518756 for spreading this out to more places.
Comment 8•7 years ago
|
||
| bugherder | ||
Description
•