Hi Lukas:

On 19 Mar 2011, at 20:19, Lukas Renggli wrote:

>> Thus, my basic test class implements some 9 tests, and my auto-sizing 
>> test-class adds two more test.
>> However, when I run the tests, only 11 tests are executed and not 2*9 + 2 = 
>> 20 tests.
>> Is there something I am missing? Is there a way that I can force SUnit to 
>> also execute the tests of the superclass?
> 
> See the method TestCase class>>#shouldInheritSelectors.
Thanks, thats what I was looking for :)

>> Or, something that would actually be nice, is there a way that I can 
>> automatically parameterize my tests with data?
> 
> In your test class create a test method that takes the parameter(s) as
> argument. Create several test methods that call this method with
> different arguments.
Ehm, that approach does not scale...

My test has currently 9 #testMethods, if I understand your proposal correctly, 
than I would end up with n*9 methods, no?
With #shouldInheritSelectors it still feels like a hack, but at least I avoid 
having to create all those methods.

Laurent, the @DataProvider feature of TestNG is basically what I was looking 
for: http://testng.org/doc/documentation-main.html#parameters

Thanks
Stefan

> 
> Lukas
> 
> -- 
> Lukas Renggli
> www.lukas-renggli.ch
> 

-- 
Stefan Marr
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
http://soft.vub.ac.be/~smarr
Phone: +32 2 629 2974
Fax:   +32 2 629 3525


Reply via email to