UbuntuIRC / 2014 /07 /02 /#ubuntu-autopilot.txt
niansa
Initial commit
4aa5fce
[02:56] <balloons> josharenson, get anywhere?
[03:28] <josharenson> balloons, no, had to take off myself... let me figure out where I was...
[03:32] <josharenson> balloons, so I just created a new project with the Ubuntu SDK, and the autopilot tests fail
[03:32] <josharenson> not like how TDD tests are supposed to fail at first, like the test suite crashes... differently than my other app
[03:37] <thomi> josharenson: can you post a traceback please?
[03:37] <josharenson> thomi http://pastebin.ubuntu.com/7734626/
[03:38] <josharenson> thomi that is from my first app, that fails because it can't find the MainView object
[03:52] <josharenson> thomi: I rm -rf'd all the stuff that the SDK created related to autopilot testing and it seems to be working when I set up everything manually (so far). Wondering if its worth filing a bug with the sdk team as the tests don't work out of the box...
[03:59] <thomi> josharenson: I'll take a quick look, one second
[03:59] <josharenson> thx
[04:00] <thomi> josharenson: hmmm - this is on trusty or utopic?
[04:00] <josharenson> utopic
[04:00] <thomi> elopio: have you seen this? ^
[04:00] <thomi> josharenson: can you show me the contents of 'run' please
[04:00] <thomi> ?
[04:02] <josharenson> 1 min
[04:02] <josharenson> thomi http://pastebin.ubuntu.com/7734706/
[04:03] <thomi> josharenson: is that script generated by the SDK, or did you make it?
[04:04] <josharenson> thomi, the SDK made it
[04:04] <thomi> josharenson: OK, there's *definitely* a bug report for the SDK team coming out of this then :)
[04:05] <josharenson> haha :-p
[04:05] <thomi> josharenson: the command to run should be 'autopilot3', not 'autopilot'. The package to install is autopilot-desktop
[04:05] <thomi> josharenson: perhaps you could update that script to run 'autopilot3' and try again?
[04:05] * josharenson trying
[04:06] <josharenson> how will the affect testing when I move to a touch device? Will phablet-test (or whatever the command is) figure this out?
[04:07] <veebers> josharenson: yes, it'll use the correct autopilot command
[04:07] <thomi> josharenson: it should do, yes
[04:09] <josharenson> thats good, I'm trying w/ autopilot3... shelved my changes and might have accidentally clobbered my repo.. hang on
[04:13] <josharenson> thomi, fails with a different error...
[04:13] <josharenson> getting a trace
[04:13] <thomi> josharenson: awesome
[04:14] <josharenson> thomi http://pastebin.ubuntu.com/7734738/
[04:14] <thomi> josharenson: ugh
[04:14] <thomi> josharenson: yeah, the SDK is really broken
[04:14] <thomi> josharenson: it's generating python 2 code :(
[04:15] <thomi> josharenson: is your branch on lp?
[04:15] <josharenson> yes
[04:16] <josharenson> https://code.launchpad.net/~josharenson/+junk/SimplePerf
[04:16] <thomi> ok, grabbing it now
[04:23] <thomi> josharenson: so, with a bit of hacking, I can get it to the point where autopilot tries to launch your app, but the app exits - I *think* that's because I'm missing a dependency that you need, so this *might* work for you
[04:24] <josharenson> thomi, ill try.. currently when I run the test suite, the app launches first and the test fails/crashes after
[04:24] <thomi> josharenson: are you happy applying a patch to your local working tree, or would you prefer I pushed my branch somewhere on lp?
[04:24] <josharenson> thomi, ill happily apply the patch
[04:24] <thomi> ok
[04:24] <thomi> josharenson: http://paste.ubuntu.com/7734757/
[04:31] <josharenson> thomi, looks like the same error...
[04:31] <thomi> josharenson: cannot find MainView ?
[04:31] <josharenson> yes
[04:31] <thomi> hmmm
[04:31] <thomi> ok
[04:31] <thomi> josharenson: so the person you really need to talk to is elopio. What timezone are you in?
[04:32] <josharenson> thomi, I can try creating the project from scratch.... I'm in GMT-8
[04:32] <elopio> hello.
[04:32] <thomi> hey - there he is :)
[04:32] <josharenson> :-)
[04:32] <thomi> apparently if we say your name 3 times you appear :)
[04:32] <josharenson> haha
[04:33] <thomi> elopio: it appears that the SDK new-project is still generating python 2 code.
[04:33] <thomi> elopio: and what's more, *broken* python 2 code :)
[04:33] <thomi> elopio: do you know what's going on there?
[04:35] <elopio> thomi: I updated one of the templates like a year ago. It could be outdated by now, as we can't really run tests for the templates.
[04:35] <elopio> and there was another template that I never got to update.
[04:36] <thomi> elopio: ok, but surely they're generating python 3 code these days?
[04:37] <elopio> "surely" it's too strong. I don't know, but I can check.
[04:37] <thomi> elopio: ok
[04:37] <elopio> josharenson: can you please give me more context of what you are trying to do?
[04:37] <thomi> elopio: it's just that, with all the work we put in to porting the world to python 3, I'd be dissapointed if we forgot about the SDK templates
[04:38] <josharenson> elopio, short version is I have a very simple QML app (created in the SDK) that I'm trying to write autopilot tests for.
[04:39] <elopio> josharenson: so, would you like me to fix the qt templates first, or get your tests running first?
[04:39] <josharenson> elopio, if I understand correctly, fixing the templates benefits everyone, whereas getting the tests running only benefits me
[04:41] <elopio> josharenson: that's a good answer :)
[04:41] <elopio> I'll grab the template and see what I can do.
[04:41] <josharenson> ok thanks
[04:42] <thomi> elopio: when you have some time, I'd love to know why we can't test the templates? If it's just a matter of 'we don't have the time to write the tests', I might have some spare time this week to look at it
[04:43] <elopio> thomi: with some time, we might get it working. The issue is that the templates have parameters
[04:43] <elopio> we don't have a way to tell qtcreator: give me this template with parameter foo=bar.
[04:43] <thomi> elopio: can't we render them ourselves?
[04:43] <elopio> in order to replace the parameters, we have to manually create the project.
[04:44] <elopio> so, we could do two things: 1. make the replacement ourselfs, which will test the python code but not its interaction with qtcreator.
[04:44] <elopio> 2. automate the creation of a project and run the tests simulating that we are a qtcreator user.
[04:45] <elopio> at that point, I prefered to look at other problems in the toolkit, and never got back to qtcreator.
[04:45] <thomi> elopio: well, I'd settle for 1) at this stage, and worry about 2) later. Is it obvious where the templates are stored? I might dig into that soon
[04:45] <josharenson> elopio, is there anything I can do to get the tests working manually in the meantime? If not, I have plenty of other things to do, so no worries
[04:45] <elopio> thomi: qtcreator-plugin-ubuntu
[04:46] <elopio> josharenson: well, for the python3 problem, just change basestring for str
[04:46] <josharenson> ah ok
[04:46] <thomi> elopio: we already did that
[04:46] <thomi> josharenson: that's the patch I provided earlier
[04:47] <elopio> about the MainView, I'm not sure what's wrong. I'm trying to reproduce it.
[04:47] <thomi> http://paste.ubuntu.com/7734757/ should make it python 3 compliant
[04:47] <josharenson> ack
[04:48] <elopio> thomi: instead of decode the output of subprocess, we have been using universal_lines=True
[04:48] <thomi> elopio: ok
[04:48] <elopio> is it all the same? or should we prefer one way?
[04:48] <thomi> elopio: it's almost the same, I see no reason to prefer one way over the other
[04:48] <elopio> josharenson: you created an "App with Simple UI", right?
[04:49] <elopio> and thomi, about testing the templates, yes, approach 1 will be better than we have now.
[04:49] <elopio> I never finished cleaning the templates, so they still have weird things.
[04:49] <thomi> elopio: they sure do :)
[04:51] <elopio> josharenson: hum, yes, your test is not using the template I touched. Another question, are you on utopic?
[04:52] <josharenson> yes on utopic
[04:52] <elopio> josharenson: and "app with simple UI"?
[04:55] <josharenson> elopio yes
[04:55] <elopio> josharenson: then there's something weird. I updated that template, and you shouldn't see any basestring.
[04:56] <elopio> in fact, the template is now py2 and py3. The only bit we are missing is change the run script to use autopilot3.
[04:56] <elopio> in the tabbed application template we have more problems, because I never updated that one.
[04:56] <elopio> that looks closer to what you are seeing.
[05:02] <josharenson> elopio, ill purge the sdk, reinstall, and recreate the app from scratch
[05:02] <josharenson> elipio, have to go offline for a bit, but ill report back within the hour
[05:04] <elopio> josharenson: I'm not sure if I'll still be here in an hour, but I'll leave comments here with my changes.
[05:04] <elopio> josharenson: if you are on utopic, you should be good to go with "App with Simple UI", I've just tried it.
[05:04] <elopio> I'm fixing the other one.
[05:50] <elopio> thomi: https://code.launchpad.net/~elopio/qtcreator-plugin-ubuntu/update_tabs_autopilot_template/+merge/225256
[05:50] <elopio> josharenson: ^
[05:50] <thomi> elopio: awesome, thanks
[05:51] <josharenson> elopio, ack thanks
[05:51] <elopio> thomi: it would be awesome if you can run those tests on qtcreator MPs.
[05:51] <thomi> elopio: yeah
[05:52] <thomi> elopio: after looking at the templates, I need to look at the qtcreator souce to see how they're rendered
[05:52] <thomi> it's a PITA that the qtcreator guys didn't make this testable
[05:52] <elopio> thomi: zbenjamin is the one that knows about qtcreator. But he's probably not near your timezone.
[05:52] <thomi> yeah
[05:53] <elopio> thomi: and I overheard that they are changing it to use more QML components, which will improve things.
[05:53] <thomi> hmmm
[05:53] <elopio> it sounds like it was an important topic on the qt conference.
[05:53] <thomi> ok
[05:56] <josharenson> elopio, I purged ubuntu-sdk and qtcreator. Then I reinstalled and created the default Hello World app.
[05:56] <josharenson> elopio, the result of the first autopilot test (after changing to autopilot3) was this
[05:56] <josharenson> http://pastebin.ubuntu.com/7735109/
[05:56] <elopio> josharenson: ok, that's good
[05:57] <elopio> install ubuntu-ui-toolkit-autopilot
[05:57] <elopio> we probably should add a README to the template.
[05:58] <josharenson> elopio, seems to be working :-) hopefully it still works when I make things more complicated. Thanks for the help...
[05:59] <elopio> josharenson: nice. Ping ubuntu-qa whenever you need help with the tests. Here or in #ubuntu-quality.
[05:59] <josharenson> ack
[06:00] <elopio> or say my name three times if you are brave.
[06:54] <josharenson> elopio, I'm getting the same error "Object not found with name 'MainView'" When using tabs... do I have to wait for your fix?
[06:55] <elopio> josharenson: yes. Or copy them from my branch to your /usr/share/qtcreator/templates/wizard/ubuntu
[13:44] <balloons> glad to see you got the templates updated last night :-)
[17:25] * balloons rants about autopilot converting datetimes to datetime objects in python
[23:15] <elopio> veebers: are you here?
[23:15] <elopio> I'm having problems with the validate_dbus_object
[23:15] <veebers> elopio: hey I'm here
[23:16] <elopio> veebers: first thing that seems different is that introspection.get_classname_from_path returns bytes now.
[23:16] <elopio> shouldn't it return a string?
[23:16] <veebers> let me have a look
[23:19] <veebers> elopio: looking at the code bytestrings are the expected output and are on purpose. There is a note though that states we need to figure out the string vs. bytestring issue
[23:20] <elopio> ok. I don't know why to use bytes, but I can update make the code work with that.
[23:20] <elopio> but I'm using this feature, so please let me know when it changes.
[23:23] <elopio> veebers: next problem is that it's really hard to get it right.
[23:23] <elopio> I think I would like something like this:
[23:23] <elopio> - There are many qml elements called ItemPage
[23:24] <elopio> - I would like a different custom proxy object for each one of them
[23:24] <elopio> - I put a different objectName to each one
[23:25] <elopio> - be able to do something like: main_view.select_single(TestPage1, objectName='page1')
[23:25] <elopio> main_view.select_single(TestPage2, objectName='page2')
[23:25] <elopio> where TestPage1 and TestPage2 are not on the QML tree.
[23:26] <veebers> elopio: right, there is an open bug/task that I have to be able to do something like that.
[23:26] <elopio> ok, good, so it does make sense outside of my head :)
[23:26] <veebers> it would allow you to define an emulator and define the query that is used to select the object in the tree, i.e. when looking for TestPage1 we're actually looking for ItemPage . . .
[23:27] <elopio> veebers: do you have the # ?
[23:27] <veebers> elopio: yeah it makes sense. Hmm, let me check, I may be lying about the bug and it might just be an open task I have on the board. one mo
[23:29] <veebers> elopio: sorry I don't see a bug for it, would you like to file one with your explanation of what you want etc. ?
[23:30] <elopio> veebers: I just want it on your roadmap. I don't mind if there is no bug. But if you want one, I'll add it.
[23:31] <elopio> balloons: have you seen reminders failing saying something like the dialog is not present?
[23:31] <veebers> elopio: If you have a moment I would appreciate the bug, helps keep track etc.
[23:41] <elopio> veebers: https://bugs.launchpad.net/autopilot/+bug/1337004
[23:41] <ubot5> Ubuntu bug 1337004 in Autopilot "Make it easier to select a custom proxy object with a class name different from the QML type" [Undecided,New]
[23:41] <veebers> elopio: awesome, thanks for that
[23:41] <elopio> veebers: and lastt problem, with a validate_dbus_object like this one:
[23:41] <elopio> http://paste.ubuntu.com/7739358/
[23:41] <elopio> I get it running perfectly when I run a single test
[23:41] * veebers looks
[23:42] <elopio> when I run the whole suite, I get More than one custom proxy class matches this object
[23:43] <veebers> elopio: hmm, I'm not sure off the top of my head, I would have to look into it, which I can't right at this moment sorry (trying to get other code landed). I can add it to my stack of things to do though
[23:44] <elopio> veebers: that's fine. I'll keep trying.