[Swfdec] Automating swfdec playing

Benjamin Otte otte at gnome.org
Wed Jun 20 07:02:46 PDT 2007


On 6/20/07, Nguyen Thai Ngoc Duy <pclouds at gmail.com> wrote:
> I got tired of firing up swfplay, click click click drag, check log
> output then restart again. How hard is it to create a mechanism to
> emulate a user to control a flash?
>
Yeah, me too. (Guess why there's no testing of UI elements...)
I can tell you the requirements:
1) Doing a test must be EASY. The caps are on purpose. Writing a test
for image/ or trace/ is super easy. 2 files, done.
2) The test must be verifiable in the official player. This is easy
with both image/ and trace/, too.
3) The testing application must test a reasonably big amount of stuff
that no other test can test.

So for the mouse tests, we probably want to specify how
swfdec_player_handle_mouse() is going to get called and then capture
trace output. Or we might want to extend the trace binary to read an
actions file that specifies what actions to take. However, we need a
way to test these in the official player. I've managed to get some
windows-only apps that script the UI, but I didn't like them so far.
I'd prefer apps that do this with X, but I don't know any.

Depending on which route we take, we must find a way to test all the
possible interactions with the mouse. Like drags, all the button
actions (RELEASE_OUTSIDE, DRAG_OVER, etc). If we hardcode the mouse
movements and clicks, that might become pretty hard, especially for
more complex things. If we don't hardcode the mouse movements, it
makes writing tests and running tests on the mm player a lot harder.

So in short: I haven't found a useful testing environment yet.


Cheers,
Benjamin


More information about the Swfdec mailing list