In 2.9.2 there will be the ability to generate real mouse and key events
for the platform, such that they come to wx the same as the real events,
and will then go on to the native widget if wx doesn't consume the
event. It's still not complete on all platforms, but it works well
where it is.
>
> 2. Do you know if what I want is possible? If so, how?
There are some 3rd party tools for recording and scripted playback of
mouse and key events, but last I checked none of them are cross platform.
>
> 3. Do you have your own continuous-testing setup for your wxPython
> project? If so, what is it like and what tools are you using?
Well, first you get a room full of computers, and then a couple dozen
monkeys to pound on the keyboards, and then...
--
Robin Dunn
Software Craftsman
http://wxPython.org
You clean up feces all day. Sounds like business as usual!
There are some 3rd party tools for recording and scripted playback of mouse and key events, but last I checked none of them are cross platform.2. Do you know if what I want is possible? If so, how?
Well, first you get a room full of computers, and then a couple dozen monkeys to pound on the keyboards, and then...3. Do you have your own continuous-testing setup for your wxPython
project? If so, what is it like and what tools are you using?
--
Robin Dunn
There are some 3rd party tools for recording and scripted playback of mouse and key events, but last I checked none of them are cross platform.2. Do you know if what I want is possible? If so, how?
Sikuli supports Windows, Mac and Linux. I tried Sikuli a few times and it had a really annoying interface, but they've made a few upgrades since, so maybe I could get it to work reliably for my dream CI setup.Well, first you get a room full of computers, and then a couple dozen monkeys to pound on the keyboards, and then...3. Do you have your own continuous-testing setup for your wxPython
project? If so, what is it like and what tools are you using?
--
Robin DunnAh, then I think we can do better than monkeys.It'll be nice if we could figure out how to build a good CI stack for cross-platform wxPython testing. I'm thinking EC2/Hudson/Nose/Sikuli, but I'll be happy to hear opinions from other people in the group.(One caveat is that I think EC2 can't create Mac instances.)
Ram.
--
To unsubscribe, send email to wxPython-user...@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en
>>
>> In 2.9.2 there will be the ability to generate real mouse and key
>> events for the platform, such that they come to wx the same as the
>> real events, and will then go on to the native widget if wx
>> doesn't consume the event. It's still not complete on all
>> platforms, but it works well where it is.
>>
>>
>> I guess that's an improvement, but I'd prefer something that actually
>> controls the mouse, keyboard and screen, since that's closer to how a
>> human user interacts with the program.
>
> What he's talking about is wxUIActionSimulator, and that is exactly what
> it does. It is a wrapper around native APIs that allow for programmatic
> control of the keyboard and mouse on the platform. Yes, you're scripting
> rather than doing true record and playback, but you could also write a
> tool that records events and turns them into a series of
> wxUIActionSimulator calls.
Which is basically what the sample is doing, although it is just demoing
key events currently. To make it more fun I also record the delay
between events so if you pause while recording then there will be a
pause during playback too, although I cut the delay times in half during
playback because I'm impatient.
http://trac.wxwidgets.org/browser/wxPython/trunk/demo/UIActionSimulator.py
> Still, I think it's better to do things like
> programmatically find the position of a control and then move the mouse
> to it than to use harcoded coordinates like (245, 345) which will need
> to be redone each time your layout changes.
If you record the positions relative to the widget that receives the
event, and then recalc the position using the same widget during event
playback, then I think that most of the position related issues will go
away.
Ram, if you wind up getting a nice soup-to-notes approach to testing
wxPython apps (both the non-GUI and GUI parts), I for one would
welcome an entry on the wiki on how you do it, if you are up for
writing it.
Automated testing (as opposed to manually testing) is something I have
entirely avoided because I have just been trying to learn actual
creation and making progress with applications, but if I can get
testing into the mix it would be a great improvement, and a good wiki
entry could help lower the activation energy for trying it.
Thanks,
Che
Are you aware of:
http://sourceforge.net/projects/pyusecase/
Version 3.4.1 according to the announcement on python.announce also
supports wxPython.
I don't do any auto testing but put this announcement aside as I really
should do so - maybe one of these days.
Werner
--
To unsubscribe, send email to wxPython-user...@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en
> I've been working hard on my CI setup. The non-GUI testing works now,
> using Hudson and EC2. Now I want to do GUI testing.
>
> I gave Sikuli a test-drive. It's still not mature enough, in my opinion.
> I also looked at a few other solutions.
>
> I'm starting to think that `wxUIActionSimulator` is the way to go. Two
> questions about it:
>
> 1. Will I be able to use `wxUIActionSimulator` in a different process
> than the wxPython program I'm testing? I want my program to be
> 2.8-based, and to do the GUI testing on a separate process that
> uses 2.9. Is that possible?
No, it only sends the events to itself.
> 2. I understand that `wxUIActionSimulator` will be released with
> wxPython 2.9.2. Can you give me a crude estimate on when that will
> be released?
A release hasn't been discussed on wx-dev yet, but the last time I said
that the discussion started even before I clicked on the send button.
So it could happen any time or it could still be a long ways off. I do
plan on starting to do some preview builds soon (a couple weeks or so)
so some more testing can be done.