Closed
Bug 976116
Opened 10 years ago
Closed 10 years ago
Implement Loop client end-to-end call test
Categories
(Hello (Loop) :: Client, defect, P1)
Hello (Loop)
Client
Tracking
(firefox34 fixed)
RESOLVED
FIXED
mozilla34
Tracking | Status | |
---|---|---|
firefox34 | --- | fixed |
People
(Reporter: abr, Assigned: andreio)
References
Details
(Whiteboard: [p=2])
User Story
For this, we're going to at least want to: * factor out the setUp and wait_for_element_displayed chunks of TestGetUrl into their own object. * write the rest of the end-to-end test code using two browsers * work out strategy for server tag to pull with services team * automatically pull/update configure the loop server
Attachments
(1 file, 3 obsolete files)
24.92 KB,
patch
|
dmosedale
:
review+
|
Details | Diff | Splinter Review |
Once we know what tools we're using for the Loop client system tests, this bug is a placeholder for implementing the actual tests. It needs sub-bugs for each of the test scenarios we'll be implementing.
Comment 1•10 years ago
|
||
Dan -- Since you did the investigation for this (bug 976114), can you tell us what tests you recommend?
Assignee: nobody → dmose
Group: mozilla-employee-confidential
Updated•10 years ago
|
Group: mozilla-employee-confidential
Comment 2•10 years ago
|
||
What we did in Talkilla was try to write a functional test to accompany most significant features (and even changes, when it made sense) that we wrote. At some level, I expect this to be a judgement call for each Bugzilla bug on the part of the coder and the reviewer. The most obvious ones are the basic stuff, like "end-to-end call works" with the various subtests ("video works", "NAT traversal works". At more detailed level, bugs that are rooted in bad interactions (or incorrectly defined interfaces) across individual units often want these sorts of tests. So I guess don't have a set of tests that I specifically recommend, as much as I just suggest we get the Marionette infrastructure up and running as quickly as we reasonably can, and then make the call on a bug by bug basis. I do expect that there will be two suites, one for tests that need to check that we handle NAT traversal (both functioning and failure), and one for everything else. The NAT traversal will require SteepleChase.
Updated•10 years ago
|
Priority: -- → P1
Whiteboard: [s=fx33]
Target Milestone: --- → mozilla33
Comment 3•10 years ago
|
||
(In reply to Dan Mosedale (:dmose) from comment #2) > I do expect that there will be two suites, one for tests that need to check > that we handle NAT traversal (both functioning and failure), and one for > everything else. The NAT traversal will require SteepleChase. I'm not sure how familiar people are with SteepleChase. So I just want to point out that SteepleChase is just a remote controller for distributing test cases to two machines. We still need to provide the different network environments, because SteepleChase does not provide or even know anything about this. With that being said the WebRTC Tiger team is currently working on setting up VM's to at least cover basic NAT scenarios. But from a platform perspective the "fix" to make the platform tests pass in these environments is to provide a TURN server as part of the setup. It probably makes sense to try to re-use the VM's and SteepleChase, but run different tests and use the Loop backend instead of a local TURN server.
Comment 4•10 years ago
|
||
I'm reassigning to Abr for bug breakdown since this is a dependency of Bug 972025.
Assignee: dmose → adam
Updated•10 years ago
|
Assignee: adam → dmose
Updated•10 years ago
|
Summary: [meta] Implement Loop client system tests → Implement Loop client end-to-end call test
Updated•10 years ago
|
Whiteboard: [s=fx33]
Target Milestone: mozilla33 → mozilla34
Updated•10 years ago
|
User Story: (updated)
Updated•10 years ago
|
User Story: (updated)
Updated•10 years ago
|
Whiteboard: [p=2]
Comment 5•10 years ago
|
||
Updated•10 years ago
|
Attachment #8472009 -
Flags: review?(standard8)
Comment 6•10 years ago
|
||
Comment on attachment 8472009 [details] [diff] [review] Implement end to end call in one browser window Review of attachment 8472009 [details] [diff] [review]: ----------------------------------------------------------------- Cancelling review as discussed on irc, due to errors such as: 0:24.37 TEST_END: MainThread ERROR, expected PASS Traceback (most recent call last): File "/Users/mark/loop/gecko-dev/testing/marionette/client/marionette/marionette_test.py", line 171, in run testMethod() File "/Users/mark/loop/gecko-dev/browser/components/loop/test/functional/test_1_browser_call.py", line 155, in test_1_browser_call feedback_form = self.wait_for_element_displayed(By.CLASS_NAME, "faces") File "/Users/mark/loop/gecko-dev/browser/components/loop/test/functional/test_1_browser_call.py", line 44, in wait_for_element_displayed .until(lambda m: m.find_element(by, locator).is_displayed()) File "/Users/mark/loop/gecko-dev/testing/marionette/client/marionette/wait.py", line 143, in until cause=last_exc) TimeoutException: Traceback (most recent call last): File "/Users/mark/loop/gecko-dev/testing/marionette/client/marionette/wait.py", line 122, in until rv = condition(self.marionette) File "/Users/mark/loop/gecko-dev/browser/components/loop/test/functional/test_1_browser_call.py", line 44, in <lambda> .until(lambda m: m.find_element(by, locator).is_displayed()) File "/Users/mark/loop/gecko-dev/testing/marionette/client/marionette/marionette.py", line 1274, in find_element response = self._send_message('findElement', 'value', **kwargs) File "/Users/mark/loop/gecko-dev/testing/marionette/client/marionette/decorators.py", line 35, in _ return func(*args, **kwargs) File "/Users/mark/loop/gecko-dev/testing/marionette/client/marionette/marionette.py", line 634, in _send_message self._handle_error(response) File "/Users/mark/loop/gecko-dev/testing/marionette/client/marionette/marionette.py", line 668, in _handle_error raise errors.NoSuchElementException(message=message, status=status, stacktrace=stacktrace) TimeoutException: Timed out after 5.1 seconds, caused by <class 'marionette.errors.NoSuchElementException'> ::: browser/components/loop/content/js/panel.jsx @@ +235,5 @@ > // from the react lib. > var cx = React.addons.classSet; > + var inputCSSClass = cx({ > + "pending": this.state.pending, > + "callUrl": !this.state.pending /* Used in functional testing, signals Nit: Please put the comment above the line. ::: browser/components/loop/content/shared/js/views.jsx @@ +227,5 @@ > getInitialState: function() { > return { > video: {enabled: false}, > + audio: {enabled: false}, > + marionetteHandle: false /* Used by functional test, signals component ready nit: please put the comment above the line. ::: browser/components/loop/standalone/content/js/webapp.jsx @@ -185,5 @@ > } else { > var date = (new Date(callUrlInfo.urlCreationDate * 1000)); > var options = {year: "numeric", month: "long", day: "numeric"}; > var timestamp = date.toLocaleDateString(navigator.language, options); > - nit: Unnecessary whitespace change, please remove from patch ::: browser/components/loop/test/functional/test_1_browser_call.py @@ +27,5 @@ > + # Unfortunately, enforcing preferences currently comes with the side > + # effect of launching and restarting the browser before running the > + # real functional tests. Bug 1048554 has been filed to track this. > + preferences = { > + "loop.server": "http://localhost:" + str(LOOP_SERVER_PORT) As discussed on irc, I think we can set "media.navigator.permission.disabled" to True here, as we don't need to worry about perms for tests. I also pondered about using fake media but that's not selectable by pref so we can leave it for now.
Attachment #8472009 -
Flags: review?(standard8)
Comment 7•10 years ago
|
||
Attachment #8472009 -
Attachment is obsolete: true
Comment 8•10 years ago
|
||
Comment on attachment 8473805 [details] [diff] [review] Implement end to end call in one browser window Want to make sure race condition is gone
Attachment #8473805 -
Flags: feedback?(standard8)
Comment 9•10 years ago
|
||
Attachment #8473805 -
Attachment is obsolete: true
Attachment #8473805 -
Flags: feedback?(standard8)
Updated•10 years ago
|
Attachment #8473862 -
Flags: feedback?(standard8)
Updated•10 years ago
|
Assignee: dmose → andrei.br92
Comment 10•10 years ago
|
||
Comment on attachment 8473862 [details] [diff] [review] Implement end to end call in one browser window Review of attachment 8473862 [details] [diff] [review]: ----------------------------------------------------------------- r=dmose with the review comments addressed. ::: browser/components/loop/build-jsx @@ +1,1 @@ > +#! /usr/bin/env python2.7 Let's not keep this pinned quite so tightly. ::: browser/components/loop/test/functional/test_1_browser_call.py @@ +27,5 @@ > + # effect of launching and restarting the browser before running the > + # real functional tests. Bug 1048554 has been filed to track this. > + preferences = { > + "loop.server": "http://localhost:" + str(LOOP_SERVER_PORT), > + "media.navigator.permission.disabled": "false" We'll want this to be True (in Pythonic syntax), and I think we'll want a few more prefs too. Borrowed from Talkilla: + # "browser.dom.window.dump.enabled": "true", + # "media.peerconnection.default_iceservers": "[]", + # "media.peerconnection.use_document_iceservers": "false", + "devtools.chrome.enabled": True, + "devtools.debugger.prompt-connection": False, + "devtools.debugger.remote-enabled": True, + # "media.volume_scale": "0" Note that some of the syntax there is wrong and will need to be corrected to be pythonic and uncommented. Also, let's hoist the preferences dicts out to a constant. @@ +42,5 @@ > + ignored_exceptions=[NoSuchElementException, StaleElementException])\ > + .until(lambda m: m.find_element(by, locator).is_displayed()) > + return self.marionette.find_element(by, locator) > + > + # XXX workaround for Marionette bug YYY Need to actually file a bug here. :-) @@ +112,5 @@ > + > + def hangup_call(self): > + self.marionette.set_context("chrome") > + button = self.marionette.find_element(By.CLASS_NAME, "btn-hangup") > + sleep(2) This needs at least an XXX comment linking to it, I think. @@ +115,5 @@ > + button = self.marionette.find_element(By.CLASS_NAME, "btn-hangup") > + sleep(2) > + button.click() > + > + def test_1_browser_call(self): I think we want to chunk this up into a set of things at the same level of abstraction, probably where each method is something like do_and_verify_foo(). @@ +118,5 @@ > + > + def test_1_browser_call(self): > + self.switch_to_panel() > + > + # get a call url This is just a comment to maintain, and I think the code is pretty readable without it. :-)
Attachment #8473862 -
Flags: feedback?(standard8) → review+
Comment 11•10 years ago
|
||
Updated•10 years ago
|
Attachment #8473862 -
Attachment is obsolete: true
Updated•10 years ago
|
Attachment #8474854 -
Flags: review+
Comment 13•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/c1754ed575cb
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment 14•10 years ago
|
||
Untracking for QA. Please needinfo me to request specific testing.
Whiteboard: [p=2] → [p=2][qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•