Autopilot always wants to emulate Nexus10 on desktop for UITK gallery tests

Bug #1471848 reported by Tim Peeters
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-ui-toolkit (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

I get a lot of failures like this:

Traceback (most recent call last):
  File "/home/tim/dev/ubuntu-ui-toolkit/m/multiColumnHeader/tests/autopilot/ubuntuuitoolkit/tests/gallery/__init__.py", line 54, in setUp
    self.resize_window()
  File "/home/tim/dev/ubuntu-ui-toolkit/m/multiColumnHeader/tests/autopilot/ubuntuuitoolkit/tests/gallery/__init__.py", line 77, in resize_window
    Eventually(Equals((self.app_width, self.app_height))))
  File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 423, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: After 10.0 seconds test failed: (1280, 800) != (1280, 776)

because my screen resolution is not high enough to emulate Nexus10. Those scenarios should only be executed when the screen resolution is sufficient.

Revision history for this message
Tim Peeters (tpeeters) wrote :

For easy reproducability, here I run a single test that fails because of the screen resolution:

tim@ubuntu:~/dev/ubuntu-ui-toolkit/m/multiColumnHeader/tests/autopilot$ autopilot3 run ubuntuuitoolkit.tests.gallery.test_gallery.GalleryAppTestCase.test_progress_and_activity
Loading tests from: /home/tim/dev/ubuntu-ui-toolkit/m/multiColumnHeader/tests/autopilot

Tests running...
<class 'Xlib.protocol.request.QueryExtension'>
<class 'Xlib.protocol.request.QueryExtension'>
======================================================================
FAIL: ubuntuuitoolkit.tests.gallery.test_gallery.GalleryAppTestCase.test_progress_and_activity(Simulating Nexus 10 in desktop)
----------------------------------------------------------------------
Binary content:
  FailedTestScreenshot (image/png)
Empty attachments:
  /var/log/syslog
  process-stdout (/home/tim/dev/ubuntu-ui-toolkit/m/multiColumnHeader/tests/launcher/launcher)

process-return-code (/home/tim/dev/ubuntu-ui-toolkit/m/multiColumnHeader/tests/launcher/launcher): {{{-15}}}
process-stderr (/home/tim/dev/ubuntu-ui-toolkit/m/multiColumnHeader/tests/launcher/launcher): {{{Testability driver loaded. Wire protocol version is "1.4".}}}
test-log: {{{
17:12:25.465 INFO _launcher:373 - Attempting to launch application '/home/tim/dev/ubuntu-ui-toolkit/m/multiColumnHeader/tests/launcher/launcher' with arguments '-I /home/tim/dev/ubuntu-ui-toolkit/m/multiColumnHeader/modules /home/tim/dev/ubuntu-ui-toolkit/m/multiColumnHeader/examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml --desktop_file_hint=/home/tim/.local/share/applications/ubuntu-ui-toolkit-gallery.desktop' as a normal process
17:12:25.471 INFO _launcher:431 - Launching process: ['/home/tim/dev/ubuntu-ui-toolkit/m/multiColumnHeader/tests/launcher/launcher', '-testability', '-I', '/home/tim/dev/ubuntu-ui-toolkit/m/multiColumnHeader/modules', '/home/tim/dev/ubuntu-ui-toolkit/m/multiColumnHeader/examples/ubuntu-ui-toolkit-gallery/ubuntu-ui-toolkit-gallery.qml', '--desktop_file_hint=/home/tim/.local/share/applications/ubuntu-ui-toolkit-gallery.desktop']
17:12:37.315 INFO _launcher:544 - waiting for process to exit.
17:12:37.315 INFO _launcher:567 - Killing process 33014
}}}

Traceback (most recent call last):
  File "/home/tim/dev/ubuntu-ui-toolkit/m/multiColumnHeader/tests/autopilot/ubuntuuitoolkit/tests/gallery/__init__.py", line 54, in setUp
    self.resize_window()
  File "/home/tim/dev/ubuntu-ui-toolkit/m/multiColumnHeader/tests/autopilot/ubuntuuitoolkit/tests/gallery/__init__.py", line 77, in resize_window
    Eventually(Equals((self.app_width, self.app_height))))
  File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 423, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: After 10.0 seconds test failed: (1280, 800) != (1280, 776)

Ran 2 tests in 16.930s
FAILED (failures=1)
tim@ubuntu:~/dev/ubuntu-ui-toolkit/m/multiColumnHeader/tests/autopilot$

Revision history for this message
Richard Huddie (rhuddie) wrote :

From looking at these logs, it appears the issue is perhaps not to do with the screen not having enough resolution.

The final assertion shows the observed window width and height (1280, 800) is not equal to the expected width and height (1280, 776). So it seems to have failed because the observed window height is actually greater than expected.

However, I was not able to reproduce the above test failure.

Revision history for this message
Cris Dywan (kalikiana) wrote :

I can run the test successfully under 2560x1440 as well as 1024x768 so as far as I can see the issue can't only be the screen resolution, which would've been far too small in the latter case

Tim, can you clarify that your screen is indeed 1280x800? Did you try changing your resolution temporarily to see how it affects the test?

Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for ubuntu-ui-toolkit (Ubuntu) because there has been no activity for 60 days.]

Changed in ubuntu-ui-toolkit (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.