Introduction and Noobie question

Nicholas Skaggs nicholas.skaggs at canonical.com
Fri Jul 5 13:57:13 UTC 2013


Welcome Cecil! Sorry you ran into this trouble! I'll help get the proper 
instructions updated on the pages you've linked. Your correct autopilot 
should be installed from the ppa, else you'll end up with an older 
version that doesn't work for our needs :-)

Thanks!

Nicholas

On 07/03/2013 08:08 PM, Cecil New wrote:
> Found the answer. I found another person with a similar problem asking 
> at:
> http://askubuntu.com/questions/315996/autopilot-importerror-no-module-named-input/316103#316103
>
> The message sounded like an installation problem. So re-installed 
> using the directions and steps in my answer.
>
> Suggest an update to FAQ
> http://unity.ubuntu.com/autopilot/faq/faq.html#q-how-do-i-install-autopilot
>
> Cheers.
>
>
> On Wed, Jul 3, 2013 at 6:34 PM, Cecil New <cecil.new at gmail.com 
> <mailto:cecil.new at gmail.com>> wrote:
>
>     Hi all, I'm Cecil and have volunteered to write test cases for
>     Ubuntu Touch.
>
>     I'm going thru the tutorial and the example didn't quite work.
>     Since I'm new to python, I thought send out a quick note... I'm
>     sure it's something simple.
>
>     Below is the output, followed by the test itself for easy
>     reference (I just copied and pasted from the tutorial).
>
>     Thanks for the help,
>     Cecil
>
>     *$ autopilot list example*
>     Loading tests from: /home/cecil/Workspace/autopilot
>
>     example.tests.test_window.MainWindowTitleTests.test_main_window_title_string
>
>
>      1 total tests.
>     *$ autopilot run -v example*
>     Loading tests from: /home/cecil/Workspace/autopilot
>
>     Tests running...
>     18:22:10.000 INFO testcase:86 -
>     ************************************************************
>     18:22:10.001 INFO testcase:87 - Starting test
>     example.tests.test_window.MainWindowTitleTests.test_main_window_title_string
>     18:22:10.575 DEBUG _X11:311 - Moving mouse to position 640,512
>     without animation.
>     18:22:10.716 ERROR testresult:23 - ERROR:
>     example.tests.test_window.MainWindowTitleTests.test_main_window_title_string
>     18:22:10.717 ERROR testresult:23 - traceback: {{{
>     Traceback (most recent call last):
>       File
>     "/home/cecil/Workspace/autopilot/example/tests/test_window.py",
>     line 20, in test_main_window_title_string
>         app_root = self.launch_application()
>       File
>     "/home/cecil/Workspace/autopilot/example/tests/test_window.py",
>     line 16, in launch_application
>         return self.launch_test_application(full_path, app_type='qt')
>     AttributeError: 'MainWindowTitleTests' object has no attribute
>     'launch_test_application'
>     }}}
>     ======================================================================
>     ERROR:
>     example.tests.test_window.MainWindowTitleTests.test_main_window_title_string
>     ----------------------------------------------------------------------
>     _StringException: test-log: {{{
>     18:22:10.000 INFO testcase:86 -
>     ************************************************************
>     18:22:10.001 INFO testcase:87 - Starting test
>     example.tests.test_window.MainWindowTitleTests.test_main_window_title_string
>     18:22:10.575 DEBUG _X11:311 - Moving mouse to position 640,512
>     without animation.
>     }}}
>
>     Traceback (most recent call last):
>       File
>     "/home/cecil/Workspace/autopilot/example/tests/test_window.py",
>     line 20, in test_main_window_title_string
>         app_root = self.launch_application()
>       File
>     "/home/cecil/Workspace/autopilot/example/tests/test_window.py",
>     line 16, in launch_application
>         return self.launch_test_application(full_path, app_type='qt')
>     AttributeError: 'MainWindowTitleTests' object has no attribute
>     'launch_test_application'
>
>
>     Ran 1 test in 0.720s
>     FAILED (failures=1)
>     $
>
>
>     *Here is the test code:*
>     *$ cat example/tests/test_window.py*
>     from autopilot.testcase import AutopilotTestCase
>     from os.path import abspath, dirname, join
>     from testtools.matchers import Equals
>
>     class MainWindowTitleTests(AutopilotTestCase):
>
>         def launch_application(self):
>             """Work out the full path to the application and launch it.
>
>             This is necessary since our test application will not be
>     in $PATH.
>
>             :returns: The application proxy object.
>
>             """
>             full_path = abspath(join(dirname(__file__), '..', '..',
>     'testapp.py'))
>             return self.launch_test_application(full_path, app_type='qt')
>
>         def test_main_window_title_string(self):
>             """The main window title must be 'Hello World'."""
>             app_root = self.launch_application()
>             main_window = app_root.select_single('QMainWindow')
>
>             self.assertThat(main_window.windowTitle, Equals("Hello
>     World"))
>     $
>
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-quality/attachments/20130705/961ff3f1/attachment.html>


More information about the Ubuntu-quality mailing list