Re: [Ddtunit-users] DDTUnit
Brought to you by:
jg_hamburg,
kgellien
|
From: <j.g...@bi...> - 2007-01-09 21:56:01
|
Hi Jan, sorry for delay of answer. - I had to catch up with work after vacation. Now to your question. I am not quite sure about it so I will try to =20 describe the functionallity of DDTUnit a bit. And perhaps you can =20 phrase your question more specifically after this. As stated DDTUnit is a direct extension of JUnit 3.8. That means =20 there exists a base class >DDTTestCase extends TestCase (of JUnit) To provide a mapping from xml resource to test method DDTUnit uses a =20 <cluster>#id, which can be mapped directly to the name of the test =20 class. -> This is provided by DDTTestCase.initContext(). <group#id> is directly mapped to existing method name of the testclass. To provide the notion of a testdata set that can be used during one =20 execution of a testmethod (like one call in JUnit) <test id=3D""> was =20= introduced. The details of an implicite loop over these testdata sets is =20 implemented in DDTTestCase class. If you now add a new dataset <test> under <group> tag the method =20 associated to the groupid will be executed the number of times there =20 are <test> provided - including the execution of setUp() and tearDown=20= () every time. So the behavior of a DDTTestCase method with one <test> dataset is =20 equal to the execution of one testmethod under TestCase of JUnit. Only if you want to define more than one testdataset per testmethod =20 you will see the benefit of using DDTUnit against JUnit. I hope this will clarify the usage a little bit. Best regards J=F6rg Am 30.12.2006 um 23:49 schrieb Jan Vlegels: > Hello, > > I'm Jan Vlegels, and i study informatics at the University Of =20 > Antwerp (Belgium). I'd like to use DDTUnit to test a tool that I'm =20= > developing. But there is one thing that I don't understand very well. > > When you want to test a method of a class with several testdata =20 > sets (i mean different sets of input parameters and expected result =20= > parameter) the docs say that you can add several <test> to the =20 > XMLResource. But how do you handle these <test> in your java =20 > testing code? Of course I want to create new tests for each =20 > testdata set. > > Can you help me? > > Thanks, > > Jan Vlegels > > _________________________________________________________________ > Meer ruimte nodig? Maak nu je eigen Space http://spaces.msn.nl/ > > |