On Thu, 8 Nov 2001 09:54:00 +1100, "Conor MacNeill" <[EMAIL PROTECTED]> wrote:
> Can you provide some motivation for doing this. Yes, Conor, check-out Anteater, a testing framework based on Ant: http://www.geocities.com/SiliconValley/Monitor/7464/anteater/ Here's a sample test case written in Anteater: <target name="content-check" depends="init"> <http debug="1" description="Comparison of streamed file with actual one"> <parallel> <listener path="/good.html"> <match> <method value="GET"/> <sendResponse href="test/responses/good.html" contentType="text/html" responseCode="301"/> </match> </listener> <sequential> <sleep seconds="1"/> <httpRequest path="/good.html"> <match> <responseCode value="301"/> </match> </httpRequest> </sequential> </parallel> </http> </target> The httpRequest element needs to have access to some of the context, which is maintained by the <http> element. The Java class corresponding to <http> simply passes that information to its children, which in turn do it for their children and so on. However this info cannot be passed down when a <parallel> or <sequential> is encountered. What I do is to collect that information from the <sequential> or <parallel> elements and do it in their enclosing element. You can take a look at the source code to see how it works. Hope this helps, -- Ovidiu Predescu <[EMAIL PROTECTED]> http://orion.rgv.hp.com/ (inside HP's firewall only) http://sourceforge.net/users/ovidiu/ (my SourceForge page) http://www.geocities.com/SiliconValley/Monitor/7464/ (GNU, Emacs, other stuff) -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
