Re: Dynamically Defining Tests from Config File

"Charlie Poole" <[email protected]>
Newsgroups gmane.comp.windows.dotnet.nunit.user
Message-ID <005d01c8341b$ac969450$85c8000a@FERRARI>
Hi Brandon, 

> The purpose of the tests is to establish a baseline of 
> behavior before some heavy refactoring.  The component being 
> tested is an ActiveX control that takes a number of 
> parameters before loading, and I am trying to verify that 
> particular features are enabled/disabled based on those 
> parameters.  This would then allow me to refactor while 
> comparing behavior to the original design.  Ideally, this 
> would have little if anything to do with the UI, but that's 
> why it should be refactored.
> 
> Would this be considered "acceptance testing", and if so, 
> what would you consider "developer testing"?
>
> I suppose it doesn't really matter as long as it's 
> _automated_ testing.

I've always called this sort of thing characterization testing,
but I don't think the name matters much either. I've had
good results using FIT for this sort of thing. You can even
get fancy and capture images of a control. FIT is very
minimalist as a framework, so you would have to write all 
the code yourself, but it would deliver the data to your
fixture and display it very nicely.

You could do it in NUnit as well, except that you will have
to deliver the data to your test yourself, by reading the
config file. When I do this, I generally loop through the
data making my tests but don't assert at all. I save up
the failures and if there are any, build a message and
call Assert.Fail.

NUnit should do more for you in this scenario - and it will 
in the future - but for your immediate needs, those are your
choices.

Charlie



-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.