[Solar-talk] tests in the browser

Travis Swicegood developement at domain51.com
Wed Sep 20 08:53:08 PDT 2006


Paul M Jones wrote:
> On Sep 20, 2006, at 9:33 AM, Travis Swicegood wrote:
>
>   
>> What about using a reporter to handle the output for tests a la
>> SimpleTest?
>>     
>
> This is a neat idea; internally, Solar_Test_Suite uses Solar_Log to  
> generate output, and you can pass a custom Log object (or Log config)  
> to Solar_Test_Suite using the 'log' config key.  Perhaps your idea  
> can build on that as a solution?
>   

Hmm...  Let me look that over.  It might work.  When I think of "log", 
though, I think of something that's actually doing some sort of 
persistent storage.  Using the config option would be good, but I would 
have a way to set a different one once the object is initialized. 

The more I think about it, the more I like the reporters being an 
observer.  We've talked about doing this with SimpleTest.  Your reporter 
class then only has to implement an update($status, $parameters), then 
you can do whatever you want inside the reporter without having to meet 
the full API or extend off of a base class.  Going the observer route 
also gives you the ability to register multiple types of output.  Say 
you have a test that's run from cron that emails you but is still in an 
Apache accessible directory, you could check for the existence of 
HTTP_HOST, and if it's available add on an HTML reporter too.

All sorts of possibilities there... :-)
-T



More information about the solar-talk mailing list