views:

62

answers:

2

Does anyone know of a library that enables you to run an application inside some kind of sandbox, with virtual mouse and keyboard support.

The use case would be to create some kind of visual test runner, that would replay all actions taken during recording and play them back.

So far I found autopy, but the fact that it controls the real mouse position is problematic, because it prevents user interaction with other tools (debugger or anything) while running.

Cross platform would be nice, but either windows or os x is fine. Python would be ideal but anything that you could create python bindings for would be ok too.

A: 

On Linux you can use Swinput for simulating mouse/key events. There are few Python wrappers around the X libraries: Python X Library, PyX11Remote. You may also looking for Xvfb, which allows to setup a virtual X11 server, so you don't have to run the tests on your physical screen.

If you need to test only an application developed using Qt, GTK, Java SWT/Swing there are few test frameworks for doing this.

zoli2k
+1  A: 

On Linux, you could run autopy inside a VNC session.

There is also pywinauto or watsup.

Craig McQueen
Thanks, pywinauto looks pretty neat, ill give it a try.
sharvey