Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 77086 invoked from network); 26 Nov 2003 14:26:38 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 26 Nov 2003 14:26:38 -0000 Received: (qmail 48247 invoked by uid 500); 26 Nov 2003 14:26:26 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 48227 invoked by uid 500); 26 Nov 2003 14:26:26 -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 39503 invoked from network); 26 Nov 2003 14:20:13 -0000 Message-ID: <1069856454.3fc4b6c67530e@webmail.neptune.lunarpages.com> Date: Wed, 26 Nov 2003 09:20:54 -0500 From: "J. Xue" Reply-to: Ant Users List To: Ant Users List Subject: Re: run junit tests in a certain order References: <1069807799.3fc3f8b7de2db@webmail.neptune.lunarpages.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.1 X-Originating-IP: 168.73.245.58 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - neptune.lunarpages.com X-AntiAbuse: Original Domain - ant.apache.org X-AntiAbuse: Originator/Caller UID/GID - [32001 502] / [47 12] X-AntiAbuse: Sender Address Domain - manifoldronin.com X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Quoting Stefan Bodewig : > On Tue, 25 Nov 2003, J. Xue wrote: > > > I'm sure I'm not the first one having this problem but can't find > > anything on google. > > Well, then you didn't use the right keywords 8-) Well, figuring out the right google keywords has been one of the hardest parts in my computing experience. 8-) > > Generally, JUnit advocates are going to tell you that you are trying > to do the wrong thing in the first place as unit tests are supposed to > be independent of each other. I totally agree, but then it doesn't contradict to what I'm trying to do. My tests are independent. I just feel it a bit silly to waste 20 mins to run a AdvancedTests suite that's doomed to fail because the SanityCheckTests suite would have failed quickly, had it not been because of the OS I'm running on happens to decide to return files in alphabetical order. Oh well, this ain't the junit list... 8-) > Now to your problem: > > An alternative to your approach is to explicitly use elements > for the tests that need a certain order and exclude them from the > that contains the rest. I do realize I have this option, but then I'd have to hardcode the test order in build.xml. Another disadvantage is that since I always fork the runner VM, having a lot of / elements would tend to slow down the build. > > For a workaround, I wrote a master test suite, in which I read from > > a file that has the list of test files in the order I want them to > > run. I then run it using . Now everything works fine as far > > as order enforcement is concerned - but all the test methods are > > listed under the master test suite class in the report! > > With Ant 1.6beta, all necessary information is inside the XML reports, > but I don't think that uses it right now (an attribute > has been added to the test elements). If you use the beta and modify > the XSLs to use the new attribute, your reports should work as well. I'll definitely give it a try tonight. Thanks. --J.X. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org