That won't solve his problem. If an assertXXX fails, it throws an
exception, so the remaining data are not tested, whether it happens in
the testXXX method or another method.

--
  Mark Van Peteghem
  http://www.q-mentum.com -- easier and more powerful unit testing

Kevin Klinemeier wrote:

>Whenever I run across situations like this, I've been making the test
>methods into "check methods", like :
>
>checkABC(expected,actual);
>
>Then my actual testXXX() methods just loop through the available data.
>
>The check methods are either private to the TestCase I'm writing, or
>sometimes I move them to a third class and use the static
>TestCase.assertXXX() methods to do the work.
>
>Hope this helps,
>
>Kevin
>
>On Tue, 26 Oct 2004 21:54:37 -0000, zoran_101 <[EMAIL PROTECTED]> wrote:

>
>>Hi,
>>
>>Hopefully this is an easy question fro somebody
>>
>>Lets say I have a test that I have to run for 100 times
>>
>>public void testABC()
>>{
>>        for(int i=0;i<100;i++)
>>        {
>>                assertEquals(someMessage, expectedResult,
>>actualResult)
>>        }
>>}
>>
>>expectedResult and actualResult are different values in every run,
>>so if the assert fails after lets say 50 runs the loop will not
>>continue.
>>
>>My question is how can I achieve the run of all the 100 test even if
>>some of them fail.
>>   
>>

Yahoo! Groups Sponsor
ADVERTISEMENT
click here
Web Bug from http://us.adserver.yahoo.com/l?M=315388.5529720.6602079.3001176/D=groups/S=:HM/A=2372354/rand=163213366


Yahoo! Groups Links

Reply via email to