Re: Performance testing extensions to NUnit

"Charlie Poole" <[email protected]> Mon, 18 Aug 2008 10:36:18 -0700
Newsgroups gmane.comp.windows.dotnet.nunit.user
Message-ID <002f01c90158$edc5c1c0$7401a8c0@ferrari>
Hi Mike,

> Subject: [Nunit-users] Performance testing extensions to NUnit
> 
> Looking through the archives, I see that this has come up a 
> couple of times before.
> 
> I know that lots of people object to frameworks that kludge 
> performance/load testing on top of fixtures that are intended 
> for use in developer/unit testing. However, some people also 
> like it :)

And any extension can support either dedicated performance
fixtures, "normal" fixtures or both.
 
> Having said this, I've seen a few things here and there in 
> NUnit that let you do timed tests, etc, but nothing really 
> exhaustive. I've been toying with the idea of quasi-porting 
> JUnitPerf[1]as an NUnit extension.

I'd say that JUnitPerf could be used for inspiration.
 
> My questions to you:
> 
> (a) Has this already been done? (Specifically for NUnit, I 
> mean. I've seen standalone frameworks that do this in an 
> NUnit-like way.) My googling skills are at times feeble.

NPerf is a defunct project that many people have missed.
A while back I asked Peli about using the code in NUnit.
He was OK with it but said:

"Regarding NPerf, I think you can extract the ideas (attributes, etc...) 
but I would bet that it would be easier for you to code it from scratch 
for NUnit. NPerf is a 'test execution' itself (as far as I remember) so 
it contains a bunch of code to discover the classes and the tests, etc... 
Code that you are probably not really interrested by."

So that fits your comment about standalone apps. The beauty
of using NPerf is that (I believe) it already has tests,
so you could code from scratch as an NUnit extension while
making the same tests pass.

Peli also wrote 

"One last remark: NPerf was implemented when I had a very naive 
understanding of performance. I'm not sure it can handle cold 
startup time or working set (flushing the OS cache, flushing 
the security cache, etc...)."

In spite of that comment, many peope liked NPerf and would like
to see it's functional equivalent brought back.
 
> (b) If it hasn't been done, is it _worth_ doing in light of 
> the upcoming 3.0 changes? I read some things that insinuated 
> that this sort of capability would be baked into 3.0 as a 
> prepackaged extension.

Au contraire! The essence of 3.0 is that none of it will be
pre-packaged in the sense that it would be built into NUnit.
Of course, some of the boilerplate of how an extension is
discovered and loaded is going to change, but that's only
a small part of any extension.

I hope you'll take a further look at this. The only reason
I'm not doing it is lack of time.

Charlie

> Thanks all!
> -Mike
> 
> [1] http://clarkware.com/software/JUnitPerf.html
> 



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/