Closed Bug 1141690 Opened 9 years ago Closed 9 years ago

write remaining functional tests for 2way media connection rooms telemetry

Categories

(Hello (Loop) :: Client, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: dmosedale, Unassigned)

References

Details

(Whiteboard: [tech-debt])

Bug 1123660 included functional/integration tests that verify the following behavior:

* link generator creates a room, 2-way media start ("media-start") is NOT noted
* link clicker enters the same room, media start IS noted
* link clicker leaves the room, call length IS noted (even though window is still open)

In the single call we've got.

We'd like to do more calls to cover that the following cases all note the call length in the appropriate sequence (e.g. that local click hangup doesn't wait for window close to note the call)

* local click hangup (disconnectSession)
* local close window (disconnectionSession)
* remote close window (RemotePeerDisconnected with peerHangup==true)
* remote click hangup (RemotePeerDisconnected with peerHangup==true).
* remote click network failure (onConnectionDestroyed, RemotePeerDisconnected with peerHangup=false)
* local network error (onSessionDisconnected, actions.ConnectionFailure), disconnection: note END)

There's probably a spin-off bug one could file here for similar coverage of the above cases where the link generator leaves a room, and then the clicker enters it first.

The trick is going to be limiting scope (the 6 cases listed here would be at least 6 separate calls).

If we really want to do a bunch more calls, we want to avoid the case where functional tests take so long to run, that people don't get the advantage of using them in the development process directly, so I suspect these calls might want to be in a separate suite that gets run by the automated testing machines, but not by default in a desktop development environment.
Blocks: 1141695
Here are the steps for manually verifying the first four cases starting with "local click hangup".  I expect this list of manual steps to be useful in writing the automated versions:

before all tests:
* use about:config to set loop.debug.twoWayMediaTelemetry to true
* restart
* open Tools -> Web Developer -> Browser Console

before each test:

* in the browser console, click the “Clear"
* click start a conversation, or click on the URL of an existing conversation
* in conversation window, click copy link
* paste into URL bar
* click “Join the conversation” button
* click “Share Selected Devices” in dropdown

== case 1 ==

* click hangup button in the inset conversation window

* verify that exactly one  of the appended “Loop Telemetry:” log messages looks like something like this:

"Loop Telemetry: noted two-way media connection in bucket: " "BETWEEN_30S_AND_5M"

* click the X widget to close the inset conversation window

* verify that no additional messages of that same form (“noted two-way media connection in bucket”) have been appended to the console

== case 2 ==

* click the X widget to close the inset conversation window

* verify that exactly one  of the appended “Loop Telemetry:” log messages looks like something like this:

"Loop Telemetry: noted two-way media connection in bucket: " "BETWEEN_30S_AND_5M"

== case 3 ==

* close the entire window by using the OS-level close button

* verify that exactly one  of the appended “Loop Telemetry:” log messages looks like something like this:

"Loop Telemetry: noted two-way media connection in bucket: " "BETWEEN_30S_AND_5M"

== case 4 ==

* click hangup button in the web page content

* verify that exactly one  of the appended “Loop Telemetry:” log messages looks like something like this:

"Loop Telemetry: noted two-way media connection in bucket: " "BETWEEN_30S_AND_5M"

* click the X widget to close inset chat window

* verify that no additional messages of that same form (“noted two-way media connection in bucket”) have been appended to the console
These cases have been manually tested, not enough value right now in automating testing to look for regressions.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.