[sugar] Injecting Code into main Sugar GUI routine

Erik Garrison erik at laptop.org
Mon Jul 7 13:28:47 EDT 2008


On Mon, Jul 07, 2008 at 11:46:13AM -0500, Zach Riggle wrote:
>  The issue that I am facing isn't so much how to actually launch the  
> Activities (via keypresses or simulated GUI clicks), but rather how to  
> do so without any user intervention whatsoever.  This is something that 
> would have to automatically run from a buildbot.
>

I see.  I misunderstood your problem.

> As you stated towards the end, the problem is hooking into the Sugar GUI 
> without any code modifications.  So far, the approach that I've been 
> using is to launch other Activities inside my own Activity's process 
> space.  As I understand it, the Sugar launch process is a series of 
> forks/process creations, which make this process hard without overriding 
> the forking function.
>

It may be most sensible to implement a DBus service within your test
suite which handles messages from the components you wish to test.

Your test paths could be reduced to iteration over:

  - (test system) Establish system state.
  - (test system) Issue fake button/mouse events.
  - (application) Application under test sends messages across the DBus
    indicating state change.
  - (test system) On receipt of correct messages within an expected
    timeout, record results and continue with the tests.

You will have to modify the source to the extent necessary to send
debugging messages.  Do you think this is acceptable?

Erik




More information about the Devel mailing list