Closed Bug 1539874 Opened 1 year ago Closed 1 year ago

Develop an integration test for telemetry subsession management

Categories

(Toolkit :: Telemetry, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: raphael, Assigned: raphael)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Extend the telemetry-tests-client suite with a test focused on verifying that Telemetry subsessions in Firefox are managed as expected. When Firefox creates new sessions and subsessions it must be reflected in Telemetry pings in the subsession ID field, the previous subsession ID field, as well as the different subsession counters.

See:
https://searchfox.org/mozilla-central/source/toolkit/components/telemetry/tests/unit/test_SubsessionChaining.js

Priority: -- → P3
Type: defect → enhancement
Assignee: nobody → rpierzina
Status: NEW → ASSIGNED

Planned test behavior:

Session S1, subsession 1

Actions

  1. Open browser
  2. Open a new tab
  3. Restart browser in new session

Session S2, subsession 1

Outcome 1

Received a main ping P1 for previous session

  • Ping base contents:
    • clientId should be set
    • sessionId should be set
    • subsessionId should be set
    • previousSessionId should not be set
    • previousSubsessionId should not be set
    • subSessionCounter should be 1
    • profileSubSessionCounter should be 1
    • reason should be "shutdown"
  • Other ping contents:
    • tab_open_event_count in scalars

Actions

  1. Install addon

Session S2, subsession 2:

Outcome 2

Received a main ping P2 for previous subsession

  • Ping base contents:
    • clientId should be set to the same value
    • sessionId should be set to a new value
    • subsessionId should be set to a new value
    • previousSessionId should be set to P1s sessionId value
    • previousSubsessionId should be set to P1s subsessionId value
    • subSessionCounter should be 1
    • profileSubSessionCounter should be 2
    • reason should be "environment-change"
  • Other ping contents:
    • tab_open_event_count not in scalars

Actions

  1. Restart browser in new session

Session S3, subsession 1

Outcome 3

Received a main ping P3 for session 2, subsession 2

  • Ping base contents:
    • clientId should be set to the same value
    • sessionId should be set to P2s sessionId value
    • subsessionId should be set to a new value
    • previousSessionId should be set to P1s sessionId value
    • previousSubsessionId should be set to P2s subsessionId value
    • subSessionCounter should be 2
    • profileSubSessionCounter should be 3
    • reason should be "shutdown"
  • Other ping contents:
    • addon ID in activeAddons in environment
Pushed by rpierzina@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0c850ce60522
Develop an integration test for telemetry subsession management; r=chutten
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.