/srv/irclogs.ubuntu.com/2014/07/02/#ubuntu-autopilot.txt

balloonsjosharenson, get anywhere?02:56
josharensonballoons, no, had to take off myself... let me figure out where I was...03:28
josharensonballoons, so I just created a new project with the Ubuntu SDK, and the autopilot tests fail03:32
josharensonnot like how TDD tests are supposed to fail at first, like the test suite crashes... differently than my other app03:32
thomijosharenson: can you post a traceback please?03:37
josharensonthomi http://pastebin.ubuntu.com/7734626/03:37
josharensonthomi that is from my first app, that fails because it can't find the MainView object03:38
josharensonthomi: 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:52
thomijosharenson: I'll take a quick look, one second03:59
josharensonthx03:59
thomijosharenson: hmmm - this is on trusty or utopic?04:00
josharensonutopic04:00
thomielopio: have you seen this? ^04:00
thomijosharenson: can you show me the contents of 'run' please04:00
thomi?04:00
josharenson1 min04:02
josharensonthomi http://pastebin.ubuntu.com/7734706/04:02
thomijosharenson: is that script generated by the SDK, or did you make it?04:03
josharensonthomi, the SDK made it04:04
thomijosharenson: OK, there's *definitely* a bug report for the SDK team coming out of this then :)04:04
josharensonhaha :-p04:05
thomijosharenson: the command to run should be 'autopilot3', not 'autopilot'. The package to install is autopilot-desktop04:05
thomijosharenson: perhaps you could update that script to run 'autopilot3' and try again?04:05
* josharenson trying04:05
josharensonhow will the affect testing when I move to a touch device? Will phablet-test (or whatever the command is) figure this out?04:06
veebersjosharenson: yes, it'll use the correct autopilot command04:07
thomijosharenson: it should do, yes04:07
josharensonthats good, I'm trying w/ autopilot3... shelved my changes and might have accidentally clobbered my repo.. hang on04:09
josharensonthomi, fails with a different error...04:13
josharensongetting a trace04:13
thomijosharenson: awesome04:13
josharensonthomi http://pastebin.ubuntu.com/7734738/04:14
thomijosharenson: ugh04:14
thomijosharenson: yeah, the SDK is really broken04:14
thomijosharenson: it's generating python 2 code :(04:14
thomijosharenson: is your branch on lp?04:15
josharensonyes04:15
josharensonhttps://code.launchpad.net/~josharenson/+junk/SimplePerf04:16
thomiok, grabbing it now04:16
thomijosharenson: 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 you04:23
josharensonthomi, ill try.. currently when I run the test suite, the app launches first and the test fails/crashes after04:24
thomijosharenson: are you happy applying a patch to your local working tree, or would you prefer I pushed my branch somewhere on lp?04:24
josharensonthomi, ill happily apply the patch04:24
thomiok04:24
thomijosharenson: http://paste.ubuntu.com/7734757/04:24
josharensonthomi, looks like the same error...04:31
thomijosharenson: cannot find MainView ?04:31
josharensonyes04:31
thomihmmm04:31
thomiok04:31
thomijosharenson: so the person you really need to talk to is elopio. What timezone are you in?04:31
josharensonthomi, I can try creating the project from scratch.... I'm in GMT-804:32
elopiohello.04:32
thomihey - there he is :)04:32
josharenson:-)04:32
thomiapparently if we say your name 3 times you appear :)04:32
josharensonhaha04:32
thomielopio: it appears that the SDK new-project is still generating python 2 code.04:33
thomielopio: and what's more, *broken* python 2 code :)04:33
thomielopio: do you know what's going on there?04:33
elopiothomi: 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
elopioand there was another template that I never got to update.04:35
thomielopio: ok, but surely they're generating python 3 code these days?04:36
elopio"surely" it's too strong. I don't know, but I can check.04:37
thomielopio: ok04:37
elopiojosharenson: can you please give me more context of what you are trying to do?04:37
thomielopio: 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 templates04:37
josharensonelopio, short version is I have a very simple QML app (created in the SDK) that I'm trying to write autopilot tests for.04:38
elopiojosharenson: so, would you like me to fix the qt templates first, or get your tests running first?04:39
josharensonelopio, if I understand correctly, fixing the templates benefits everyone, whereas getting the tests running only benefits me04:39
elopiojosharenson: that's a good answer :)04:41
elopioI'll grab the template and see what I can do.04:41
josharensonok thanks04:41
thomielopio: 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 it04:42
elopiothomi: with some time, we might get it working. The issue is that the templates have parameters04:43
elopiowe don't have a way to tell qtcreator: give me this template with parameter foo=bar.04:43
thomielopio: can't we render them ourselves?04:43
elopioin order to replace the parameters, we have to manually create the project.04:43
elopioso, we could do two things: 1. make the replacement ourselfs, which will test the python code but not its interaction with qtcreator.04:44
elopio2. automate the creation of a project and run the tests simulating that we are a qtcreator user.04:44
elopioat that point, I prefered to look at other problems in the toolkit, and never got back to qtcreator.04:45
thomielopio: 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 soon04:45
josharensonelopio, 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 worries04:45
elopiothomi: qtcreator-plugin-ubuntu04:45
elopiojosharenson: well, for the python3 problem, just change basestring for str04:46
josharensonah ok04:46
thomielopio: we already did that04:46
thomijosharenson: that's the patch I provided earlier04:46
elopioabout 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 compliant04:47
josharensonack04:47
elopiothomi: instead of decode the output of subprocess, we have been using universal_lines=True04:48
thomielopio: ok04:48
elopiois it all the same? or should we prefer one way?04:48
thomielopio: it's almost the same, I see no reason to prefer one way over the other04:48
elopiojosharenson: you created an "App with Simple UI", right?04:48
elopioand thomi, about testing the templates, yes, approach 1 will be better than we have now.04:49
elopioI never finished cleaning the templates, so they still have weird things.04:49
thomielopio: they sure do :)04:49
elopiojosharenson: hum, yes, your test is not using the template I touched. Another question, are you on utopic?04:51
josharensonyes on utopic04:52
elopiojosharenson: and "app with simple UI"?04:52
josharensonelopio yes04:55
elopiojosharenson: then there's something weird. I updated that template, and you shouldn't see any basestring.04:55
elopioin fact, the template is now py2 and py3. The only bit we are missing is change the run script to use autopilot3.04:56
elopioin the tabbed application template we have more problems, because I never updated that one.04:56
elopiothat looks closer to what you are seeing.04:56
josharensonelopio, ill purge the sdk, reinstall, and recreate the app from scratch05:02
josharensonelipio, have to go offline for a bit, but ill report back within the hour05:02
elopiojosharenson: I'm not sure if I'll still be here in an hour, but I'll leave comments here with my changes.05:04
elopiojosharenson: if you are on utopic, you should be good to go with "App with Simple UI", I've just tried it.05:04
elopioI'm fixing the other one.05:04
elopiothomi: https://code.launchpad.net/~elopio/qtcreator-plugin-ubuntu/update_tabs_autopilot_template/+merge/22525605:50
elopiojosharenson: ^05:50
thomielopio: awesome, thanks05:50
josharensonelopio, ack thanks05:51
elopiothomi: it would be awesome if you can run those tests on qtcreator MPs.05:51
thomielopio: yeah05:51
thomielopio: after looking at the templates, I need to look at the qtcreator souce to see how they're rendered05:52
thomiit's a PITA that the qtcreator guys didn't make this testable05:52
elopiothomi: zbenjamin is the one that knows about qtcreator. But he's probably not near your timezone.05:52
thomiyeah05:52
elopiothomi: and I overheard that they are changing it to use more QML components, which will improve things.05:53
thomihmmm05:53
elopioit sounds like it was an important topic on the qt conference.05:53
thomiok05:53
josharensonelopio, I purged ubuntu-sdk and qtcreator. Then I reinstalled and created the default Hello World app.05:56
josharensonelopio, the result of the first autopilot test (after changing to autopilot3) was this05:56
josharensonhttp://pastebin.ubuntu.com/7735109/05:56
elopiojosharenson: ok, that's good05:56
elopioinstall ubuntu-ui-toolkit-autopilot05:57
elopiowe probably should add a README to the template.05:57
josharensonelopio, seems to be working :-) hopefully it still works when I make things more complicated. Thanks for the help...05:58
elopiojosharenson: nice. Ping ubuntu-qa whenever you need help with the tests. Here or in #ubuntu-quality.05:59
josharensonack05:59
elopioor say my name three times if you are brave.06:00
josharensonelopio, I'm getting the same error "Object not found with name 'MainView'" When using tabs... do I have to wait for your fix?06:54
elopiojosharenson: yes. Or copy them from my branch to your /usr/share/qtcreator/templates/wizard/ubuntu06:55
balloonsglad to see you got the templates updated last night :-)13:44
* balloons rants about autopilot converting datetimes to datetime objects in python17:25
elopioveebers: are you here?23:15
elopioI'm having problems with the validate_dbus_object23:15
veeberselopio: hey I'm here23:15
elopioveebers: first thing that seems different is that introspection.get_classname_from_path returns bytes now.23:16
elopioshouldn't it return a string?23:16
veeberslet me have a look23:16
veeberselopio: 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 issue23:19
elopiook. I don't know why to use bytes, but I can update make the code work with that.23:20
elopiobut I'm using this feature, so please let me know when it changes.23:20
elopioveebers: next problem is that it's really hard to get it right.23:23
elopioI think I would like something like this:23:23
elopio- There are many qml elements called ItemPage23:23
elopio- I would like a different custom proxy object for each one of them23:24
elopio- I put a different objectName to each one23:24
elopio- be able to do something like: main_view.select_single(TestPage1, objectName='page1')23:25
elopiomain_view.select_single(TestPage2, objectName='page2')23:25
elopiowhere TestPage1 and TestPage2 are not on the QML tree.23:25
veeberselopio: right, there is an open bug/task that I have to be able to do something like that.23:26
elopiook, good, so it does make sense outside of my head :)23:26
veebersit 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:26
elopioveebers: do you have the # ?23:27
veeberselopio: 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 mo23:27
veeberselopio: sorry I don't see a bug for it, would you like to file one with your explanation of what you want etc. ?23:29
elopioveebers: 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:30
elopioballoons: have you seen reminders failing saying something like the dialog is not present?23:31
veeberselopio: If you have a moment I would appreciate the bug, helps keep track etc.23:31
elopioveebers: https://bugs.launchpad.net/autopilot/+bug/133700423:41
ubot5Ubuntu 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
veeberselopio: awesome, thanks for that23:41
elopioveebers: and lastt problem, with a validate_dbus_object like this one:23:41
elopiohttp://paste.ubuntu.com/7739358/23:41
elopioI get it running perfectly when I run a single test23:41
* veebers looks23:41
elopiowhen I run the whole suite, I get More than one custom proxy class matches this object23:42
veeberselopio: 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 though23:43
elopioveebers: that's fine. I'll keep trying.23:44

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