Re: junit 4 - generating a test suite at runtime for each pair of tests.

"Paul King [email protected] [junit]" <[email protected]> Tue, 23 Jun 2015 20:44:25 +1000
Newsgroups gmane.comp.java.junit.user
Message-ID <[email protected]>
I would guess that he wants the pair testing to help track down "global state" problem
rather than as a permanent measure.

Cheers, Paul.

On 23/06/2015 7:07 PM, Colin Vipurs [email protected] [junit] wrote:
> Hi Ray,
>
> It sounds like one (or more) of your tests is manipulating global state which is affecting one (or more) other tests, hence the reason for the failing test passing when run by itself.  Rather than generating a combination of tests it would be much better to isolate the state manipulation so that it can be controlled correctly from within the test.
>
> On Tue, Jun 23, 2015 at 2:49 AM, Ray Tayek [email protected] <mailto:[email protected]> [junit] <[email protected] <mailto:[email protected]>> wrote:
>
>     __
>
>     using junit 4, i have a test case <http://xunitpatterns.com/Testcase%20Class.html> that has n test methods <http://xunitpatterns.com/Test%20Method.html>, one of the test methods fails when the test case is run. and this failing test method succeeds when run by itself.
>
>     i would like to dynamically (at run time) create a set of test suites <http://xunitpatterns.com/Test%20Suite%20Object.html> (or test cases), one for each pair of test methods in the test case.
>
>     so a test case with 3 test methods would generate 3!=6 test suites (or test cases).
>
>     thanks
>
>     --
>     Honesty is a very expensive gift. So, don't expect it from cheap people - Warren Buffett
>     http://tayek.com/
>
>
>
>
> --
> Maybe she awoke to see the roommate's boyfriend swinging from the chandelier wearing a boar's head.
>
> Something which you, I, and everyone else would call "Tuesday", of course.
>
> 


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



------------------------------------
Posted by: Paul King <[email protected]>
------------------------------------