[Swfdec] Automating swfdec playing

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


Oh, maybe I should add what I've done already.

I downloaded AutoIt [1] and created a script [attached] and a test
swf. Then I ran it in the SWF player. After that I hacked trace.c into
mouse.c and replicated the same behavior.

That all works fine, but the test is very hard to use since the whole
thing is hardcoded. So I didn't commit it yet.

Benjamin

[1] http://www.autoitscript.com/autoit3/


On 6/20/07, Benjamin Otte <otte at gnome.org> wrote:
> 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
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: autoit-flash.au3
Type: application/octet-stream
Size: 353 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/swfdec/attachments/20070620/9c51dcc4/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mouse.c
Type: text/x-csrc
Size: 3673 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/swfdec/attachments/20070620/9c51dcc4/attachment.c 


More information about the Swfdec mailing list