Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 28107 invoked from network); 29 Jan 2005 01:01:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 29 Jan 2005 01:01:50 -0000 Received: (qmail 9679 invoked by uid 500); 29 Jan 2005 01:01:48 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 8761 invoked by uid 500); 29 Jan 2005 01:01:45 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 8748 invoked by uid 99); 29 Jan 2005 01:01:45 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from relay3.hrnoc.net (HELO relay3.hrnoc.net) (216.120.225.15) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 28 Jan 2005 17:01:45 -0800 Received: from smtp-2.hrnoc.net ([216.120.225.38]) by relay3.hrnoc.net with esmtp (Exim 4.32; FreeBSD) id 1CugzO-000Izw-Ux for user@ant.apache.org; Fri, 28 Jan 2005 20:01:26 -0500 Received: (qmail 665 invoked by uid 510); 29 Jan 2005 01:01:42 -0000 Received: from antlist@allnicepeople.com by smtp-2.hrnoc.net by uid 89 with qmail-scanner-1.20st (clamuko: 0.74. spamassassin: 2.63. Clear:RC:1(216.120.225.30):. Processed in 0.105183 secs); 29 Jan 2005 01:01:42 -0000 X-Qmail-Scanner-Mail-From: antlist@allnicepeople.com via smtp-2.hrnoc.net X-Qmail-Scanner: 1.20st (Clear:RC:1(216.120.225.30):. Processed in 0.105183 secs) Received: from webmail.hrnoc.net (HELO webmail2.hrnoc.net) (antlist@allnicepeople.com@216.120.225.30) by smtp-2.hrnoc.net with SMTP; 29 Jan 2005 01:01:42 -0000 MIME-Version: 1.0 X-Mailer: V-webmail 1.5.0 ( http://www.v-webmail.co.uk/ ) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-ID: Date: Fri, 28 Jan 2005 20:01:37 -0500 From: "Dan " To: user@ant.apache.org Subject: Ant + jUnit +++ deal with failures? Reply-To: antlist@allnicepeople.com X-Originating-IP: [63.251.50.5] X-HR-Scan-Signature: d499bceb902cd09386ea79f79f4d7b5c X-HR-SA-Score: () X-HR-Status: HR_AVScanned-(antlist@allnicepeople.com/216.120.225.38) X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org