Autopilot test `test_switch_precipitation_scale` is failing

Bug #1234953 reported by Corey Goldberg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Weather App
Fix Released
Critical
Martin Borho

Bug Description

Autopilot tests are currently failing in trunk.

failing test:
 - test_settings.TestSettings.test_switch_precipitation_scale

autopilot command to run test:
- $ autopilot-run ubuntu_weather_app.tests.test_settings.TestSettings.test_switch_precipitation_scale

more details:
 - http://reports.qa.ubuntu.com/smokeng/saucy/touch_ro/4539/ubuntu-weather-app-autopilot/450489/

CI console output and stacktrace:

--------

Loading tests from: /usr/lib/python2.7/dist-packages

19:47:31.089 INFO autopilot:141 - Autopilot Source Version: 1.3.1
Autopilot Package Version: 1.3.1+13.10.20131003.1-0ubuntu1
Tests running...
19:47:31.133 INFO __init__:156 - Launching process: ['/usr/lib/arm-linux-gnueabihf/qt5/bin/qmlscene', '-testability',
'/usr/share/ubuntu-weather-app/ubuntu-weather-app.qml', '--desktop_file_hint=/usr/share/applications/ubuntu-weather-app.desktop']
__pthread_gettid -2
19:47:33.349 DEBUG dbus:415 - Selecting objects of type QQuickView with attributes: {}
19:47:33.433 INFO testcase:552 - waiting for process to exit.
19:47:33.434 INFO testcase:554 - Killing process 3430
19:47:33.512 INFO globals:49 - ************************************************************
19:47:33.513 INFO globals:50 - Starting test ubuntu_weather_app.tests.test_settings.TestSettings.test_switch_precipitation_scale (with touch)
19:47:33.515 WARNING testcase:118 - No tracing available - install the python-autopilot-trace package!
19:47:33.575 WARNING testcase:155 - Process manager backend unavailable, application snapshot support disabled.
19:47:33.614 INFO __init__:156 - Launching process: ['/usr/lib/arm-linux-gnueabihf/qt5/bin/qmlscene', '-testability',
'/usr/share/ubuntu-weather-app/ubuntu-weather-app.qml', '--desktop_file_hint=/usr/share/applications/ubuntu-weather-app.desktop']
19:47:35.399 DEBUG dbus:415 - Selecting objects of type QQuickView with attributes: {}
19:47:35.462 DEBUG dbus:415 - Selecting objects of type MainView with attributes: {}
19:47:35.528 DEBUG dbus:415 - Selecting objects of type WeatherDetailComponent with attributes: {'objectName': 'PrecipitationValue'}
19:47:36.039 DEBUG dbus:415 - Selecting objects of type MainView with attributes: {}
19:47:36.113 DEBUG dbus:415 - Selecting objects of type WeatherDetailComponent with attributes: {'objectName': 'PrecipitationValue'}
19:47:36.546 INFO testcase:552 - waiting for process to exit.
19:47:36.547 INFO testcase:554 - Killing process 3464
19:47:36.714 ERROR testresult:35 - ERROR: ubuntu_weather_app.tests.test_settings.TestSettings.test_switch_precipitation_scale(with touch)
19:47:36.719 ERROR testresult:35 - process-return-code: {{{
-15}}}
19:47:36.721 ERROR testresult:35 - traceback: {{{
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/ubuntu_weather_app/tests/test_settings.py", line 228, in test_switch_precipitation_scale
self._check_precipitation_units('mm')
File "/usr/lib/python2.7/dist-packages/ubuntu_weather_app/tests/test_settings.py", line 68, in _check_precipitation_units
self.assertThat(lambda: component.get_object('QQuickText', 'WeatherDetailUnit'), Eventually(Not(Is(None))))
File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 406, in assertThat
mismatch = matcher.match(matchee)
File "/usr/lib/python2.7/dist-packages/autopilot/matchers/__init__.py", line 109, in match
wait_fun(self.matcher, self.timeout)
File "/usr/lib/python2.7/dist-packages/autopilot/matchers/__init__.py", line 125, in _callable_wait_for
new_value = refresh_fn()
File "/usr/lib/python2.7/dist-packages/ubuntu_weather_app/tests/test_settings.py", line 68, in <lambda>
self.assertThat(lambda: component.get_object('QQuickText', 'WeatherDetailUnit'), Eventually(Not(Is(None))))
File "/usr/lib/python2.7/dist-packages/autopilot/introspection/dbus.py", line 498, in __getattr__
(self.__class__.__name__, name))
AttributeError: Class 'WeatherDetailComponent' has no attribute 'get_object'.
}}}
19:47:36.724 ERROR testresult:35 - process-stderr: {{{
unknown option -- t
unknown option -- e
unknown option -- s
unknown option -- t
unknown option -- a
unknown option -- b
unknown option -- i
unknown option -- l
unknown option -- i
unknown option -- t
unknown option -- y
loaded the dummy plugin
loaded the Linux plugin
Registered the AalSensorPlugin types

Loading testability driver.
unity::action::ActionManager::ActionManager(QObject*):
Could not determine application identifier. HUD will not work properly.
Provide your application identifier in $APP_ID environment variable.
file:///usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/MainView.qml:257: TypeError: Cannot call method 'hasOwnProperty' of null
[Hamburg] returning cached data, time from last fetch: 1.112
[London] returning cached data, time from last fetch: 1.081
callbacks 0x4042198d 0x40421939
creating surface at (0, 58) with size (768, 1222) with title 'qmlscene: weather'QOpenGLShader::link: "--From Fragment Shader:
--From Vertex Shader:
Link was successful.
"
QOpenGLShader::link: "--From Fragment Shader:
--From Vertex Shader:
Link was successful.
"
QOpenGLShader::link: "--From Fragment Shader:
--From Vertex Shader:
Link was successful.
"
QOpenGLShader::link: "--From Fragment Shader:
--From Vertex Shader:
Link was successful.
"
QOpenGLShader::link: "--From Fragment Shader:
--From Vertex Shader:
Link was successful.
"
QOpenGLShader::link: "--From Fragment Shader:
--From Vertex Shader:
Link was successful.
"
QOpenGLShader::link: "--From Fragment Shader:
--From Vertex Shader:
Link was successful.
"
}}}
19:47:36.729 ERROR testresult:35 - process-stdout: {{{
}}}
======================================================================
ERROR: ubuntu_weather_app.tests.test_settings.TestSettings.test_switch_precipitation_scale(with touch)
----------------------------------------------------------------------
_StringException: Empty attachments:
process-stdout

process-return-code: {{{-15}}}
process-stderr: {{{
unknown option -- t
unknown option -- e
unknown option -- s
unknown option -- t
unknown option -- a
unknown option -- b
unknown option -- i
unknown option -- l
unknown option -- i
unknown option -- t
unknown option -- y
loaded the dummy plugin
loaded the Linux plugin
Registered the AalSensorPlugin types

Loading testability driver.
unity::action::ActionManager::ActionManager(QObject*):
Could not determine application identifier. HUD will not work properly.
Provide your application identifier in $APP_ID environment variable.
file:///usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/MainView.qml:257: TypeError: Cannot call method 'hasOwnProperty' of null
[Hamburg] returning cached data, time from last fetch: 1.112
[London] returning cached data, time from last fetch: 1.081
callbacks 0x4042198d 0x40421939
creating surface at (0, 58) with size (768, 1222) with title 'qmlscene: weather'QOpenGLShader::link: "--From Fragment Shader:
--From Vertex Shader:
Link was successful.
"
QOpenGLShader::link: "--From Fragment Shader:
--From Vertex Shader:
Link was successful.
"
QOpenGLShader::link: "--From Fragment Shader:
--From Vertex Shader:
Link was successful.
"
QOpenGLShader::link: "--From Fragment Shader:
--From Vertex Shader:
Link was successful.
"
QOpenGLShader::link: "--From Fragment Shader:
--From Vertex Shader:
Link was successful.
"
QOpenGLShader::link: "--From Fragment Shader:
--From Vertex Shader:
Link was successful.
"
QOpenGLShader::link: "--From Fragment Shader:
--From Vertex Shader:
Link was successful.
"
}}}

test-log: {{{
19:47:33.512 INFO globals:49 - ************************************************************
19:47:33.513 INFO globals:50 - Starting test ubuntu_weather_app.tests.test_settings.TestSettings.test_switch_precipitation_scale (with touch)
19:47:33.515 WARNING testcase:118 - No tracing available - install the python-autopilot-trace package!
19:47:33.575 WARNING testcase:155 - Process manager backend unavailable, application snapshot support disabled.
19:47:33.614 INFO __init__:156 - Launching process: ['/usr/lib/arm-linux-gnueabihf/qt5/bin/qmlscene', '-testability',
'/usr/share/ubuntu-weather-app/ubuntu-weather-app.qml', '--desktop_file_hint=/usr/share/applications/ubuntu-weather-app.desktop']
19:47:35.399 DEBUG dbus:415 - Selecting objects of type QQuickView with attributes: {}
19:47:35.462 DEBUG dbus:415 - Selecting objects of type MainView with attributes: {}
19:47:35.528 DEBUG dbus:415 - Selecting objects of type WeatherDetailComponent with attributes: {'objectName': 'PrecipitationValue'}
19:47:36.039 DEBUG dbus:415 - Selecting objects of type MainView with attributes: {}
19:47:36.113 DEBUG dbus:415 - Selecting objects of type WeatherDetailComponent with attributes: {'objectName': 'PrecipitationValue'}
19:47:36.546 INFO testcase:552 - waiting for process to exit.
19:47:36.547 INFO testcase:554 - Killing process 3464
}}}

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/ubuntu_weather_app/tests/test_settings.py", line 228, in test_switch_precipitation_scale
self._check_precipitation_units('mm')
File "/usr/lib/python2.7/dist-packages/ubuntu_weather_app/tests/test_settings.py", line 68, in _check_precipitation_units
self.assertThat(lambda: component.get_object('QQuickText', 'WeatherDetailUnit'), Eventually(Not(Is(None))))
File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 406, in assertThat
mismatch = matcher.match(matchee)
File "/usr/lib/python2.7/dist-packages/autopilot/matchers/__init__.py", line 109, in match
wait_fun(self.matcher, self.timeout)
File "/usr/lib/python2.7/dist-packages/autopilot/matchers/__init__.py", line 125, in _callable_wait_for
new_value = refresh_fn()
File "/usr/lib/python2.7/dist-packages/ubuntu_weather_app/tests/test_settings.py", line 68, in <lambda>
self.assertThat(lambda: component.get_object('QQuickText', 'WeatherDetailUnit'), Eventually(Not(Is(None))))
File "/usr/lib/python2.7/dist-packages/autopilot/introspection/dbus.py", line 498, in __getattr__
(self.__class__.__name__, name))
AttributeError: Class 'WeatherDetailComponent' has no attribute 'get_object'.

Ran 1 test in 5.638s
FAILED (failures=1)
ADB_RC=1

Related branches

Changed in ubuntu-weather-app:
assignee: nobody → Corey Goldberg (coreygoldberg)
Changed in ubuntu-weather-app:
assignee: Corey Goldberg (coreygoldberg) → nobody
Revision history for this message
Martin Borho (martin-borho) wrote :

There's already a fix, which would have landed yesterday, but a jenkins issue was against it...

Will try today again...

Changed in ubuntu-weather-app:
assignee: nobody → Martin Borho (martin-borho)
status: New → In Progress
importance: Undecided → High
importance: High → Critical
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :

Fix committed into lp:ubuntu-weather-app at revision 133, scheduled for release in ubuntu-weather-app, milestone alpha-1

Changed in ubuntu-weather-app:
status: In Progress → Fix Committed
David Planella (dpm)
Changed in ubuntu-weather-app:
status: Fix Committed → Fix Released
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.