First, I have searched the archives and found some ideas, but I would like to
get more ideas from people on the best ways to do what I want.  

I have a J2EE system running on Weblogic that I want to write a monitoring app
to watch.  I want to check that the servers are up, that the db is returning
queries, and that some actual site functionality is working.  My plan is to
create httpUnit (or possibly Cactus) tests that do Black-Box testing of the
site.  If any of the tests fail, I want to do some type of action -- restart
WebLogic, send an email, log an error, etc.  This seems like a great use of
Ant.

My biggest question is what is the best way to use Ant with httpUnit (or
jUnit) to inteligently recognize the errors that are happening so they can be
properly handled.  Ant tasks for JUnit allow a variable to be set to TRUE if
there is an error or failure, but not any processing of the message itself.  I
could set the tests up to be 1 assertion per test case so that if there is a
failure I know exactly what it is, but that seems like a lot of test classes. 
Is there anyway for me to programatically handle different jUnit failures
differently in Ant?  

I was thining maybe through custom formatters that parse the message and
perform actions, but then I am taking flow control away from Ant and that is
one of the nice things about using ant to do the server restart and the email
stuff.

So... any suggestions for how to organize my test cases or how to process them
in Ant so I can inteligently deal with failures?

(I know jUnit was meant for developer unit testing, not black-box testing, but
it fites so nicely into our testing framework!)

Thank you for any ideas and suggestions...
Dan





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to