#ubuntu-autopilot 2014-12-15
<dustmite> hello all
<dustmite> we are trying to test the autopilot deployment at my work
<dustmite> we are running into the issue where outbound port 11371 is being blocked
<balloons> dustmite, ? what is autopilot to you
<balloons> http://developer.ubuntu.com/api/devel/ubuntu-14.10/python/autopilot/
<dustmite> hmmm
<dustmite> guess, i should try reading
<dustmite> i hear it is helpful
<dustmite> i was thinking ubuntu.com/autopilot
<dustmite> sorry for the confusion
<SidPayton> QUESTION: I'm trying to install autopilot but after adding the ppa the package python3-vis can not be found. Is this still the correct name? Or what went presumably wrong?
<balloons> SidPayton, python3-autopilot-vis is what you want
<balloons> SidPayton, where is it listed improperly?
<SidPayton> balloons,  https://wiki.ubuntu.com/Touch/CoreApps/Testing/ContributeAutopilotTestcase
<SidPayton> and thanks
<balloons> SidPayton, fixed :-) . I'm happy to help if you have questions about writing or contributing testcases as well
<SidPayton> Oh thank you very much balloons. I will most likely be needing help. right now I'm just setting up and will try to get my head around the tutorial
<balloons> SidPayton, you are most welcome.
#ubuntu-autopilot 2014-12-16
<SidPayton> QUESTION: 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.
<balloons> SidPayton, certainly
<balloons> let's see if I can find a simple bug for you to tackle
<balloons> SidPayton, I'm just looking through https://bugs.launchpad.net/ubuntu-phone-coreapps/+bugs?field.tag=needs-autopilot-test
<SidPayton> please make it simple as possible :D
<balloons> SidPayton, hmm
<SidPayton> I do understand if you don't have time for such a beginner.  I just would love to learn how to use autopilot and contribute back
<balloons> SidPayton, 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 :-)
<balloons> SidPayton, I'm thinking this might be a good one: https://bugs.launchpad.net/dropping-letters/+bug/1317214
<ubot5> Launchpad bug 1317214 in Dropping Letters "Autopilot test needed: check for game over" [Medium,Confirmed]
<balloons> so SidPayton dropping letters is a simple qml game and should be easy to play with and add the test for
<SidPayton> hehe. easy for you maybe
<SidPayton> trying to figure out how to open it via qmlscene
<balloons> SidPayton, I think it was amongst the first apps I wrote tests for as well ;-)
<balloons> ok, so the tests are inside tests/autopilot
<balloons> this is typical for all the core apps
<balloons> from the root of the branch 'qmlscene dropping-letters.qml' should launch the game
<SidPayton> it doesn't somehow
<balloons> SidPayton, ahh, well let's troubleshoot. What happens?
<balloons> but first, do you have the ubuntu-sdk metapackage installed? and what version of ubuntu are you on again?
<SidPayton> I'm in the directory with droppimg-letters.png and test (Folder) inside
<SidPayton> I'm on 14.04. And I don't have the sdk metapackage installed
<balloons> SidPayton, ahh, well let's fix that
<balloons> and then the app will launch :-)
<balloons> you actually should use the sdk team ppa since you are on 14.04. That will make sure you have the updated sdk
<SidPayton> could you give me the ppa name?
<balloons> sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
<balloons> sudo apt-get update && sudo apt-get install ubuntu-sdk
<SidPayton> balloons: it would be nice if https://wiki.ubuntu.com/Touch/CoreApps/Testing/ContributeAutopilotTestcase would meantion the metapackage. This is the site I followed blindly ;)
<balloons> SidPayton, excellent point
 * balloons updated requirements
<SidPayton> wow you're really quick
<SidPayton> module "QtQuick" version 2.3 is not installed
<SidPayton> this isn't in the SDK?
<balloons> SidPayton, do you have ubuntu-ui-toolkit-autopilot installed?
<balloons> that might also need to be specified.. I'm curious
<balloons> SidPayton, yes I would think so..
<SidPayton> I've only followed the instructions
<SidPayton> otherwise this system is clean
<balloons> SidPayton, and you are launching by using qmlscene?
<SidPayton> yes
<SidPayton> but it stops because of QtQuick missing
<balloons> SidPayton, what does sudo apt-get install ubuntu-ui-toolkit-autopilot do?
<SidPayton> balloons: installation of ubuntu-ui-toolkit-autopilot didn't solve the issue with QtQuick missing
<balloons> SidPayton, yes, I was curious if you had it
<balloons> the qtquick issue relates to qt5 version
<SidPayton> ah, now I have it
<balloons> trusty shipped with an older version of qt, 5.0 or 5.1 I'd guess
<SidPayton> hmm, I'm really looking foreward to the app-confinement (click) coming to the desktop
<balloons> SidPayton, 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 version
<SidPayton> how we do that?
<balloons> ready for some fun? open the dropping-letters.qml file and change the import to be import QtQuick 2.0 from import QtQuick 2.3
<SidPayton> okay
<balloons> SidPayton, ohh, one thing.. Did you dist-upgrade after installing from the ppa?
<balloons> that might be the issue
<SidPayton> module "Ubuntu.Components" version 1.1 is not installed
<balloons> change the components version to 1.0
<SidPayton> also not installed
<SidPayton> is there a way to get all of these new versions for 14.04?
<balloons> SidPayton, that's what the ppa should have done
<balloons> SidPayton, ohh right, the version should be 0.1 sorry
<balloons> SidPayton, does sudo apt-get dist-upgrade show any pending upgrades?
<SidPayton> 34 Cannot assign to non-existent property "audioRole"
<SidPayton> yes it had 5 to update, but I did apt-get update earlier
<balloons> what did it update? does it work now?
<SidPayton> several packages including ui-toolkit
<balloons> ahh, that sounds like the ticket
<SidPayton> I'll revert the changes to the qml-file ant try it again as soon as the update is complete
<balloons> kk.
<balloons> bzr revert is handy to revert
<SidPayton> thx
<SidPayton> it's back with QtQuick 2.3
<balloons> SidPayton, right, heh, so try asking for version 2.0. I believe it should work after that
<balloons> (though I'm curious why 5.3 is being asked for
<SidPayton> 34 Cannot assign to non-existent property "audioRole"
<SidPayton> maybe I have the wrong dropping letters
<SidPayton> hmm
<balloons> SidPayton, 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 cycle
<balloons> hence the ppa, but it's not bringing qt5.3 to trusty
<SidPayton> so I'll be needing vivid as well?
<SidPayton> would rather stay on lts
<balloons> what's odd for me is why dropping letters is requiring it as it was written much earlier
<balloons> SidPayton, ohh wait
<balloons> so the app also has dependencies listed in it's debian/control file. I'm sure I have them, but you probably don't
<balloons> sudo apt-get install qtdeclarative5-qtmultimedia-plugin qtdeclarative5-xmllistmodel-plugin qtdeclarative5-particles-plugin
<balloons> my guess is you are simply missing for example the multimedia plugin
<ahayzen> ... remember they added audio roles to media-hub
<balloons> hai ahayzen :-)
<ahayzen> o/
<SidPayton> were all installed already
<ahayzen> ..but then desktop doesn't have media-hub so how does the role get set? i assume in the qtmultimedia thing?
<balloons> one more, but I'll guess you do have it
<balloons> qtdeclarative5-ubuntu-ui-toolkit-plugin
<SidPayton> yes I have it
<balloons> running utopic would solve these issues, but I'm still quite surprised we're hitting them
<SidPayton> maybe it's just me.
<balloons> SidPayton, try something for me
<balloons> bzr revert -r 65
<balloons> then try running the game again
<SidPayton> 36 Cannot assign to non-existent property "audioRole"
<balloons> if it still fails, try bzr revert -r 60.
<balloons> and finally, bzr revert -r 54
<balloons> I'm pushing you back in time to older app versions :-)
<SidPayton> 60 works
<balloons> 60 was the last revision before the addition of the audio change
<SidPayton> ah okay
<balloons> anyways, it won't affect the tests so you can still write and push an MP for them :-)
<SidPayton> and this hasn't landed in the ppa yet?
<balloons> what hasn't landed in the ppa?
<SidPayton> whatever is needed so that the audio changes work again :)
<SidPayton> anyway, 60 is working and if you say that I can write a test for this version I'm happy to try something new
<ahayzen> oh interest which version of the qtmultimedia plugin is in the PPA?
<balloons> SidPayton, 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 purposes
<balloons> So 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)
<balloons> SidPayton, but yes, hack against rev 60, should all be great
<SidPayton> hmm, 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 ;)
<balloons> SidPayton, 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 desktop
<balloons> SidPayton, 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 better
<balloons> bah copy paste buffers: http://nik90.com/fiddling-around-with-lxc-containers/
<SidPayton> yea I guess it for most new guys it would be convinient to have as less requirements as possible
<SidPayton> wow, haven't read this yet, thanks
<balloons> you are welcome. Fortunately you can hack on things for now as-is. So does the bug make sense to you SidPayton ?
<balloons> you can run the current testsuite from tests/autopilot
<balloons> autopilot3 list dropping_letters_app
<balloons> should list all the tests
<balloons> autopilot3 run -v dropping_letters_app
<balloons> should run them
<SidPayton> give me a moment, was trying to open autopilot vis.
<balloons> SidPayton, ahh, yes, you should explore that too :-)
<SidPayton> okay, they all work
<SidPayton> balloons: how do I best check it one row has reached the top?
<SidPayton> for some reason autopilot vis won't start
<SidPayton> autopilot: error: argument mode: invalid choice: 'vis' (choose from 'run', 'list', 'launch')
<balloons> SidPayton, autopilot3 vis
<balloons> autopilot is the legacy python2 version, so you should use autopilot3
<balloons> easy mistake to make ;-)
<balloons> there's a python2 version of vis too, but you would have to install it
<balloons> python-autopilot-vis
<balloons> the py2 version isn't as nice
<balloons> SidPayton, 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 them
<SidPayton> autopilot3 vis should be updated in the tutorial as well ;)
<balloons> SidPayton, awesome, I'm on it
<balloons> SidPayton, so looking at the qml, you can see each game tile has an objectname assigned of gametilebox
<SidPayton> so I have vis open, but the dropdown doesn't contain anything like in the video tutorial
<balloons> SidPayton, they are qml Rectangle types. And they are inside a column Repeater
<balloons> SidPayton, you should see comubuntudropping-letters and unity
<balloons> the video tutorial was with the python2 version so there will be some more goodies
<SidPayton> balloons: yeah
<SidPayton> balloons: vis is waiting for a dbus connection
<balloons> SidPayton, ohh.. did you launch dropping letters via autopilot first?
<SidPayton> hmm, via qmlscene
<balloons> SidPayton,
<balloons> http://paste.ubuntu.com/9543009/
<SidPayton> did I miss that in the video?
<balloons> mm perhaps.. heck the video is dropping letters isn't it?
<SidPayton> it's sudoko
<balloons> ahh, k
<SidPayton> balloons: it's working
<balloons> :-)
<SidPayton> now I just need to understand how these things work :D
<balloons> right, glad the setup piece is all done
<SidPayton> me too
<SidPayton> balloons: did you use vis to find out that each tile has the objectname of gametilebox?
<balloons> SidPayton, I looked inside the qml file, dropping-letters.qml
<balloons> SidPayton, I looked at this section: http://paste.ubuntu.com/9543278/
<SidPayton> I think I just found the collums. but vis keeps crashing
<balloons> ohh, that's no good. So there's another way to get dbus dump data. That's to use the print_tree command
<balloons> SidPayton, http://unity.ubuntu.com/autopilot/api/introspection.html#autopilot.introspection.dbus.DBusIntrospectionObject.print_tree
<balloons> so you can select an object or even the entire page or mainview and print it's tree and all children
<balloons> that let's you effectively save a dump of the tree you can browse and search
<balloons> SidPayton, 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/
<balloons> now 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?
<SidPayton> I 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 anymore
<balloons> SidPayton, I use print_tree all the time; it's quite handy and "official".  So this is what I did: http://paste.ubuntu.com/9543375/
<balloons> I 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 both
<SidPayton> this is my dump output http://paste.ubuntu.com/9543439/
<balloons> SidPayton, ahh, so you need to run in the directory containing the tests. For the core apps that's always tests/autopilot
<balloons> you can check by running autopilot3 list dropping_letters_app
<balloons> the folder called dropping_letters_app should exist as a subdirectory
<balloons> good evening Letozaf_
<Letozaf_> balloons, good evening to you :)
<balloons> so you have some big MPs for docviewer ;-) it's odd jenkins didn't run on themn
<balloons> ohh there's a pre-req
<Letozaf_> balloons, yeah true, wounder why
<Letozaf_> balloons, yes on one of them
<balloons> I approved the first, that should trigger the second
<Letozaf_> balloons, good, hope everything is ok
<balloons> Letozaf_, on the second, where you going to add a test for it?
<Letozaf_> balloons, yes I added a test to go to page on a pdf documente
<Letozaf_> document
<balloons> and it's also weird it's showing a diff for the pdf
<balloons> do you know why?
<balloons> Letozaf_, I don't see a test added here: https://code.launchpad.net/~carla-sella/ubuntu-docviewer-app/test-go-to-page-pdf-file/+merge/244690
<balloons> unless I'm missing it :-)
<Letozaf_> balloons, let me check
<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 diff
<balloons> Letozaf_, 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 actually
<balloons> ahh I see it in the bracnh, it's truncated on the site
<Letozaf_> balloons, yes because I added a pdf document with more than one page otherwise I could not test the go to page
<balloons> yep yep, makes sense
<Letozaf_> balloons, on a pdf with only one page
<balloons> Letozaf_, looks cool
<Letozaf_> balloons, :)
<balloons> you are really really getting good at these things, haha
<Letozaf_> balloons, thank you
 * Letozaf_ blushes
<balloons> SidPayton, get it running properly?
<SidPayton> balloons: been trying to figure this out http://paste.ubuntu.com/9543544/
<balloons> SidPayton, 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 :-) )
<balloons> so try another test first and see if it runs
<SidPayton> they are working just fine
<balloons> SidPayton, ok that's good
<SidPayton> balloons: is it possible to search for objectnames in vis?
<balloons> SidPayton, sadly no. The search just looks for objecttype names
<SidPayton> http://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?
<balloons> SidPayton, the way autopilot works, it has access via dbus introspection, to all the objects created and there properties
<balloons> to 'find' an object during runtime, we issue selects
<balloons> that's the select_single calls you see
<balloons> select_many('QQuickRectangle') would return all the QQuickRectangle objects the app has
<SidPayton> balloons: 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 soon
<balloons> SidPayton, same to you. Thanks so much for going through everything, helped me clean it up a little :-)
#ubuntu-autopilot 2017-12-24
<m4sk1n> hello
