/srv/irclogs.ubuntu.com/2014/12/16/#ubuntu-autopilot.txt

SidPaytonQUESTION: hello, balloons is there a way I can help you guys in some easy to learn ways? Maybe just adding a few lines in a new test (not writing a complete one myself). Would love to learn this in baby steps.16:52
balloonsSidPayton, certainly16:54
balloonslet's see if I can find a simple bug for you to tackle16:54
balloonsSidPayton, I'm just looking through https://bugs.launchpad.net/ubuntu-phone-coreapps/+bugs?field.tag=needs-autopilot-test16:56
SidPaytonplease make it simple as possible :D16:57
balloonsSidPayton, hmm16:59
SidPaytonI do understand if you don't have time for such a beginner.  I just would love to learn how to use autopilot and contribute back17:02
balloonsSidPayton, of course we do! I'm just hesitant to put you on reminders as it requires you to compile the app and some other things.  There's plenty of options, I'm just reading bugs to find the right one :-)17:03
balloonsSidPayton, I'm thinking this might be a good one: https://bugs.launchpad.net/dropping-letters/+bug/131721417:04
ubot5Launchpad bug 1317214 in Dropping Letters "Autopilot test needed: check for game over" [Medium,Confirmed]17:04
balloonsso SidPayton dropping letters is a simple qml game and should be easy to play with and add the test for17:09
SidPaytonhehe. easy for you maybe17:11
SidPaytontrying to figure out how to open it via qmlscene17:11
balloonsSidPayton, I think it was amongst the first apps I wrote tests for as well ;-)17:11
balloonsok, so the tests are inside tests/autopilot17:12
balloonsthis is typical for all the core apps17:12
balloonsfrom the root of the branch 'qmlscene dropping-letters.qml' should launch the game17:13
SidPaytonit doesn't somehow17:14
balloonsSidPayton, ahh, well let's troubleshoot. What happens?17:14
balloonsbut first, do you have the ubuntu-sdk metapackage installed? and what version of ubuntu are you on again?17:14
SidPaytonI'm in the directory with droppimg-letters.png and test (Folder) inside17:15
SidPaytonI'm on 14.04. And I don't have the sdk metapackage installed17:16
balloonsSidPayton, ahh, well let's fix that17:16
balloonsand then the app will launch :-)17:16
balloonsyou actually should use the sdk team ppa since you are on 14.04. That will make sure you have the updated sdk17:17
SidPaytoncould you give me the ppa name?17:17
balloonssudo add-apt-repository ppa:ubuntu-sdk-team/ppa17:17
balloonssudo apt-get update && sudo apt-get install ubuntu-sdk17:17
SidPaytonballoons: it would be nice if https://wiki.ubuntu.com/Touch/CoreApps/Testing/ContributeAutopilotTestcase would meantion the metapackage. This is the site I followed blindly ;)17:22
balloonsSidPayton, excellent point17:26
* balloons updated requirements17:28
SidPaytonwow you're really quick17:30
SidPaytonmodule "QtQuick" version 2.3 is not installed17:30
SidPaytonthis isn't in the SDK?17:30
balloonsSidPayton, do you have ubuntu-ui-toolkit-autopilot installed?17:32
balloonsthat might also need to be specified.. I'm curious17:32
balloonsSidPayton, yes I would think so..17:32
SidPaytonI've only followed the instructions17:33
SidPaytonotherwise this system is clean17:33
balloonsSidPayton, and you are launching by using qmlscene?17:33
SidPaytonyes17:34
SidPaytonbut it stops because of QtQuick missing17:34
balloonsSidPayton, what does sudo apt-get install ubuntu-ui-toolkit-autopilot do?17:35
SidPaytonballoons: installation of ubuntu-ui-toolkit-autopilot didn't solve the issue with QtQuick missing17:35
balloonsSidPayton, yes, I was curious if you had it17:36
balloonsthe qtquick issue relates to qt5 version17:36
SidPaytonah, now I have it17:36
balloonstrusty shipped with an older version of qt, 5.0 or 5.1 I'd guess17:36
SidPaytonhmm, I'm really looking foreward to the app-confinement (click) coming to the desktop17:37
balloonsSidPayton, so anyways, I'm unsure of how to solve the qtquick issue. However, I believe it will run if we tell it to use the older version17:41
SidPaytonhow we do that?17:41
balloonsready for some fun? open the dropping-letters.qml file and change the import to be import QtQuick 2.0 from import QtQuick 2.317:41
SidPaytonokay17:42
balloonsSidPayton, ohh, one thing.. Did you dist-upgrade after installing from the ppa?17:42
balloonsthat might be the issue17:42
SidPaytonmodule "Ubuntu.Components" version 1.1 is not installed17:42
balloonschange the components version to 1.017:43
SidPaytonalso not installed17:43
SidPaytonis there a way to get all of these new versions for 14.04?17:45
balloonsSidPayton, that's what the ppa should have done17:47
balloonsSidPayton, ohh right, the version should be 0.1 sorry17:47
balloonsSidPayton, does sudo apt-get dist-upgrade show any pending upgrades?17:48
SidPayton34 Cannot assign to non-existent property "audioRole"17:49
SidPaytonyes it had 5 to update, but I did apt-get update earlier17:49
balloonswhat did it update? does it work now?17:51
SidPaytonseveral packages including ui-toolkit17:52
balloonsahh, that sounds like the ticket17:53
SidPaytonI'll revert the changes to the qml-file ant try it again as soon as the update is complete17:54
balloonskk.17:55
balloonsbzr revert is handy to revert17:55
SidPaytonthx17:56
SidPaytonit's back with QtQuick 2.317:58
balloonsSidPayton, right, heh, so try asking for version 2.0. I believe it should work after that18:00
balloons(though I'm curious why 5.3 is being asked for18:00
SidPayton34 Cannot assign to non-existent property "audioRole"18:00
SidPaytonmaybe I have the wrong dropping letters18:01
SidPaytonhmm18:02
balloonsSidPayton, I don't think so :-) So I'm running vivid, and most folks run utopic or even vivd as well who are doing this development. The reason for this is the app development platform was under heavy development through the utopic cycle18:04
balloonshence the ppa, but it's not bringing qt5.3 to trusty18:04
SidPaytonso I'll be needing vivid as well?18:04
SidPaytonwould rather stay on lts18:05
balloonswhat's odd for me is why dropping letters is requiring it as it was written much earlier18:05
balloonsSidPayton, ohh wait18:05
balloonsso the app also has dependencies listed in it's debian/control file. I'm sure I have them, but you probably don't18:06
balloonssudo apt-get install qtdeclarative5-qtmultimedia-plugin qtdeclarative5-xmllistmodel-plugin qtdeclarative5-particles-plugin18:06
balloonsmy guess is you are simply missing for example the multimedia plugin18:06
ahayzen... remember they added audio roles to media-hub18:07
balloonshai ahayzen :-)18:07
ahayzeno/18:07
SidPaytonwere all installed already18:08
ahayzen..but then desktop doesn't have media-hub so how does the role get set? i assume in the qtmultimedia thing?18:08
balloonsone more, but I'll guess you do have it18:09
balloonsqtdeclarative5-ubuntu-ui-toolkit-plugin18:09
SidPaytonyes I have it18:09
balloonsrunning utopic would solve these issues, but I'm still quite surprised we're hitting them18:11
SidPaytonmaybe it's just me.18:12
balloonsSidPayton, try something for me18:13
balloonsbzr revert -r 6518:13
balloonsthen try running the game again18:13
SidPayton36 Cannot assign to non-existent property "audioRole"18:14
balloonsif it still fails, try bzr revert -r 60.18:14
balloonsand finally, bzr revert -r 5418:14
balloonsI'm pushing you back in time to older app versions :-)18:15
SidPayton60 works18:15
balloons60 was the last revision before the addition of the audio change18:16
SidPaytonah okay18:17
balloonsanyways, it won't affect the tests so you can still write and push an MP for them :-)18:18
SidPaytonand this hasn't landed in the ppa yet?18:18
balloonswhat hasn't landed in the ppa?18:18
SidPaytonwhatever is needed so that the audio changes work again :)18:18
SidPaytonanyway, 60 is working and if you say that I can write a test for this version I'm happy to try something new18:20
ahayzenoh interest which version of the qtmultimedia plugin is in the PPA?18:21
balloonsSidPayton, ahh :-) It seems backporting the full qt stack is problematic for a few reasons, so 14.04 isn't going to get desktop support. The idea from a developer prospective is you would run inside a chroot.. that kind of doesn't work well for our testing purposes18:21
balloonsSo to run the tests for newer core apps you will need utopic or better, or you'll be limited to running the tests on device (which is OK too, but harder for someone new I think)18:24
balloonsSidPayton, but yes, hack against rev 60, should all be great18:25
SidPaytonhmm, thats annoying. But maybe I this PC is powerfull enough for vivid in a virtualbox. A container (docker) version with everything ready to use would be even better ;)18:26
balloonsSidPayton, yea, I'm wondering about having just an execution environment. If you have a device it more or less matters not, but it's easier when you are new to have vis available to you and to be able to iterate on the desktop18:30
balloonsSidPayton, seems like nik90_ has done this via lxc container, which was my thought. He has a writeup: it seems to run the tests for newer core apps you will need utopic or better18:32
balloonsbah copy paste buffers: http://nik90.com/fiddling-around-with-lxc-containers/18:32
SidPaytonyea I guess it for most new guys it would be convinient to have as less requirements as possible18:33
SidPaytonwow, haven't read this yet, thanks18:34
balloonsyou are welcome. Fortunately you can hack on things for now as-is. So does the bug make sense to you SidPayton ?18:34
balloonsyou can run the current testsuite from tests/autopilot18:34
balloonsautopilot3 list dropping_letters_app18:35
balloonsshould list all the tests18:35
balloonsautopilot3 run -v dropping_letters_app18:35
balloonsshould run them18:35
SidPaytongive me a moment, was trying to open autopilot vis.18:36
balloonsSidPayton, ahh, yes, you should explore that too :-)18:36
SidPaytonokay, they all work18:38
SidPaytonballoons: how do I best check it one row has reached the top?18:42
SidPaytonfor some reason autopilot vis won't start18:45
SidPaytonautopilot: error: argument mode: invalid choice: 'vis' (choose from 'run', 'list', 'launch')18:45
balloonsSidPayton, autopilot3 vis18:51
balloonsautopilot is the legacy python2 version, so you should use autopilot318:51
balloonseasy mistake to make ;-)18:51
balloonsthere's a python2 version of vis too, but you would have to install it18:51
balloonspython-autopilot-vis18:51
balloonsthe py2 version isn't as nice18:52
balloonsSidPayton, as far as how to check one row has reached the top, I'd have to look into the source a bit myself. Each block is an object, and there should be an object that contains them18:55
SidPaytonautopilot3 vis should be updated in the tutorial as well ;)19:00
balloonsSidPayton, awesome, I'm on it19:00
balloonsSidPayton, so looking at the qml, you can see each game tile has an objectname assigned of gametilebox19:04
SidPaytonso I have vis open, but the dropdown doesn't contain anything like in the video tutorial19:05
balloonsSidPayton, they are qml Rectangle types. And they are inside a column Repeater19:05
balloonsSidPayton, you should see comubuntudropping-letters and unity19:05
balloonsthe video tutorial was with the python2 version so there will be some more goodies19:06
SidPaytonballoons: yeah19:06
SidPaytonballoons: vis is waiting for a dbus connection19:07
balloonsSidPayton, ohh.. did you launch dropping letters via autopilot first?19:07
SidPaytonhmm, via qmlscene19:07
balloonsSidPayton,19:07
balloonshttp://paste.ubuntu.com/9543009/19:07
SidPaytondid I miss that in the video?19:07
balloonsmm perhaps.. heck the video is dropping letters isn't it?19:08
SidPaytonit's sudoko19:10
balloonsahh, k19:10
SidPaytonballoons: it's working19:13
balloons:-)19:13
SidPaytonnow I just need to understand how these things work :D19:14
balloonsright, glad the setup piece is all done19:15
SidPaytonme too19:15
SidPaytonballoons: did you use vis to find out that each tile has the objectname of gametilebox?19:34
balloonsSidPayton, I looked inside the qml file, dropping-letters.qml19:37
balloonsSidPayton, I looked at this section: http://paste.ubuntu.com/9543278/19:37
SidPaytonI think I just found the collums. but vis keeps crashing19:38
balloonsohh, that's no good. So there's another way to get dbus dump data. That's to use the print_tree command19:38
balloonsSidPayton, http://unity.ubuntu.com/autopilot/api/introspection.html#autopilot.introspection.dbus.DBusIntrospectionObject.print_tree19:38
balloonsso you can select an object or even the entire page or mainview and print it's tree and all children19:39
balloonsthat let's you effectively save a dump of the tree you can browse and search19:39
balloonsSidPayton, so you can do something like this inside of test_dropping_letters.py, then run the new test_dump test. http://paste.ubuntu.com/9543337/19:41
balloonsnow in your case you are interested in the object data during the game, so we can tweak the test to load a new game, and then dump. make sense?19:41
SidPaytonI would rather try it the official way. vis seems to work now. had to restart the whole thing. but now I don't seem to be able to find the right collums anymore19:43
balloonsSidPayton, I use print_tree all the time; it's quite handy and "official".  So this is what I did: http://paste.ubuntu.com/9543375/19:45
balloonsI find it handy to be able to visually see all the data in text format like that.. it's not quite the same as vis, but it may come in handy to use both19:46
SidPaytonthis is my dump output http://paste.ubuntu.com/9543439/19:51
balloonsSidPayton, ahh, so you need to run in the directory containing the tests. For the core apps that's always tests/autopilot19:54
balloonsyou can check by running autopilot3 list dropping_letters_app19:54
balloonsthe folder called dropping_letters_app should exist as a subdirectory19:54
balloonsgood evening Letozaf_19:54
Letozaf_balloons, good evening to you :)19:56
balloonsso you have some big MPs for docviewer ;-) it's odd jenkins didn't run on themn19:56
balloonsohh there's a pre-req19:56
Letozaf_balloons, yeah true, wounder why19:56
Letozaf_balloons, yes on one of them19:56
balloonsI approved the first, that should trigger the second19:57
Letozaf_balloons, good, hope everything is ok19:58
balloonsLetozaf_, on the second, where you going to add a test for it?19:59
Letozaf_balloons, yes I added a test to go to page on a pdf documente19:59
Letozaf_document19:59
balloonsand it's also weird it's showing a diff for the pdf19:59
balloonsdo you know why?19:59
balloonsLetozaf_, I don't see a test added here: https://code.launchpad.net/~carla-sella/ubuntu-docviewer-app/test-go-to-page-pdf-file/+merge/24469019:59
balloonsunless I'm missing it :-)19:59
Letozaf_balloons, let me check20:00
Letozaf_balloons, if I browse the code the test is :  test_go_to_page_pdf_file in test_docviewer.py, do not know why it's not in the diff20:02
balloonsLetozaf_, probably because you didn't commit and push the latest version of what you have locally..  it's a big diff though, so it might just be truncated actually20:03
balloonsahh I see it in the bracnh, it's truncated on the site20:03
Letozaf_balloons, yes because I added a pdf document with more than one page otherwise I could not test the go to page20:04
balloonsyep yep, makes sense20:04
Letozaf_balloons, on a pdf with only one page20:04
balloonsLetozaf_, looks cool20:04
Letozaf_balloons, :)20:04
balloonsyou are really really getting good at these things, haha20:05
Letozaf_balloons, thank you20:05
* Letozaf_ blushes20:05
balloonsSidPayton, get it running properly?20:07
SidPaytonballoons: been trying to figure this out http://paste.ubuntu.com/9543544/20:10
balloonsSidPayton, it's a good idea to go ahead and try and run the original test suite and make sure it works (so you know your setup works :-) )20:12
balloonsso try another test first and see if it runs20:12
SidPaytonthey are working just fine20:14
balloonsSidPayton, ok that's good20:19
SidPaytonballoons: is it possible to search for objectnames in vis?20:25
balloonsSidPayton, sadly no. The search just looks for objecttype names20:27
SidPaytonhttp://paste.ubuntu.com/9543667/ so as I understand it the number of letters in one row is saved in model: letters for each row in the repeater. How do I access that information?20:34
balloonsSidPayton, the way autopilot works, it has access via dbus introspection, to all the objects created and there properties20:37
balloonsto 'find' an object during runtime, we issue selects20:37
balloonsthat's the select_single calls you see20:37
balloonsselect_many('QQuickRectangle') would return all the QQuickRectangle objects the app has20:38
SidPaytonballoons: okay, I will remember this and try to continue at this point next time. Have nice holidays and thank you very much for your help. see you soon20:43
balloonsSidPayton, same to you. Thanks so much for going through everything, helped me clean it up a little :-)20:47

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!