Closed Bug 1169637 Opened 6 years ago Closed 6 years ago

Fix failure in test_marketplace_packaged_app.py

Categories

(Firefox OS Graveyard :: Gaia::UI Tests, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: martijn.martijn, Assigned: martijn.martijn)

References

Details

Attachments

(1 file)

I'm seeing this failure on Jenkins:
http://jenkins1.qa.scl3.mozilla.com/job/flame-kk-319.b2g-inbound.tinderbox.ui.functional.smoke/4292/testReport/%28root%29/test_marketplace_packaged_app_py%20TestSearchMarketplaceAndInstallApp_test_search_and_install_app/test_marketplace_packaged_app_py_TestSearchMarketplaceAndInstallApp_test_search_and_install_app/
Traceback (most recent call last):
  File "/var/jenkins/1/workspace/flame-kk-319.b2g-inbound.tinderbox.ui.functional.smoke/.env/local/lib/python2.7/site-packages/marionette_client-0.13-py2.7.egg/marionette/marionette_test.py", line 296, in run
    testMethod()
  File "/var/jenkins/1/workspace/flame-kk-319.b2g-inbound.tinderbox.ui.functional.smoke/tests/python/gaia-ui-tests/gaiatest/tests/functional/marketplace/test_marketplace_packaged_app.py", line 31, in test_search_and_install_app
    first_result.tap_install_button()
  File "/var/jenkins/1/workspace/flame-kk-319.b2g-inbound.tinderbox.ui.functional.smoke/tests/python/gaia-ui-tests/gaiatest/apps/marketplace/app.py", line 71, in tap_install_button
    self.root_element.find_element(*self._install_button_locator).tap()
  File "/var/jenkins/1/workspace/flame-kk-319.b2g-inbound.tinderbox.ui.functional.smoke/.env/local/lib/python2.7/site-packages/marionette_driver-0.7-py2.7.egg/marionette_driver/marionette.py", line 49, in find_element
    return self.marionette.find_element(method, target, self.id)
  File "/var/jenkins/1/workspace/flame-kk-319.b2g-inbound.tinderbox.ui.functional.smoke/.env/local/lib/python2.7/site-packages/marionette_driver-0.7-py2.7.egg/marionette_driver/marionette.py", line 1538, in find_element
    response = self._send_message('findElement', 'value', **kwargs)
  File "/var/jenkins/1/workspace/flame-kk-319.b2g-inbound.tinderbox.ui.functional.smoke/.env/local/lib/python2.7/site-packages/marionette_driver-0.7-py2.7.egg/marionette_driver/decorators.py", line 36, in _
    return func(*args, **kwargs)
  File "/var/jenkins/1/workspace/flame-kk-319.b2g-inbound.tinderbox.ui.functional.smoke/.env/local/lib/python2.7/site-packages/marionette_driver-0.7-py2.7.egg/marionette_driver/marionette.py", line 711, in _send_message
    self._handle_error(response)
  File "/var/jenkins/1/workspace/flame-kk-319.b2g-inbound.tinderbox.ui.functional.smoke/.env/local/lib/python2.7/site-packages/marionette_driver-0.7-py2.7.egg/marionette_driver/marionette.py", line 747, in _handle_error
    raise errors.lookup(status)(message, stacktrace=stacktrace)

NoSuchElementException: NoSuchElementException: Unable to locate element: .button.product.install


Locally, I also saw in error at:
http://mxr.mozilla.org/gaia/source/tests/python/gaia-ui-tests/gaiatest/apps/marketplace/app.py#56
Comment on attachment 8612887 [details] [review]
[gaia] mwargers:1169637 > mozilla-b2g:master

This fixes the failures I was seeing. 
I still got failures, but that was because the website was not loading, probably the connection that I'm using here was unstable.
Attachment #8612887 - Flags: review?(npark)
Attachment #8612887 - Flags: review?(jlorenzo)
I ran it locally, and it passes on above section, but now it fails during uninstall for some reason. I get:

TEST-UNEXPECTED-ERROR | test_marketplace_packaged_app.py TestSearchMarketplaceAndInstallApp.test_search_and_install_app | AssertionError: Failed to uninstall app: False

Traceback (most recent call last):
  File "/Users/mozilla/.virtualenvs/2.2/lib/python2.7/site-packages/marionette_client-0.13-py2.7.egg/marionette/marionette_test.py", line 326, in run
    self.tearDown()
  File "/Users/mozilla/GitRepo/gaia/tests/python/gaia-ui-tests/gaiatest/tests/functional/marketplace/test_marketplace_packaged_app.py", line 51, in tearDown
    self.apps.uninstall(self.app_name)
  File "/Users/mozilla/GitRepo/gaia/tests/python/gaia-ui-tests/gaiatest/gaia_test.py", line 144, in uninstall
    assert (result is True), 'Failed to uninstall app: %s' % result
TEST-INFO took 125270ms

But the App is uninstalled properly, so perhaps it's another timing issue?

If you want to raise a new bug, that's fine, or if you want me to re-review that is good too. it seems to fix the above issue though so setting it as r+.
Attachment #8612887 - Flags: review?(npark) → review+
(In reply to No-Jun Park [:njpark] from comment #3)
I guess this is because of the changes I made in bug 1150009. Can you do python setup.py develop in  tests/python/gaia-ui-tests and then see if that fixes it?
Flags: needinfo?(npark)
Blocks: 1168284
Attachment #8612887 - Flags: review?(jlorenzo)
Comment on attachment 8612887 [details] [review]
[gaia] mwargers:1169637 > mozilla-b2g:master

Johan, I updated the pull request with your comments. 
I repeated the test 5 times and it passes all the time locally.
Attachment #8612887 - Flags: review?(jlorenzo)
Attachment #8612887 - Flags: review?(jlorenzo) → review+
https://github.com/mozilla-b2g/gaia/commit/9ab039cf1b3585cd1ab07c8f95edc7d6af5427b3
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
After running setup.py, the test is consistently passing. looks good to me.
Flags: needinfo?(npark)
You need to log in before you can comment on or make changes to this bug.