For Programmers: Free Programming Magazines  


Home > Archive > Extreme Programming > September 2005 > NUnit threading









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author NUnit threading
Chris Durkin

2005-09-15, 6:57 pm

Greetings,

Does anyone know what the threading model is for NUnit tests and test
fixtures? Does each fixture get its own thread? Do all the tests for a
fixture run on the same thread?

If I had to guess, I'd say yes to both, but it's hard to tell for sure
due to skimpy documentation. I guess if noone knows maybe I'll do the
work and figure this out, then post back. It would be nice to get a
quick answer though.



Thanks,
Chris

Chris Durkin

2005-09-15, 6:57 pm

Actually it looks like the whole NUnit GUI runs on one thread. I put a
loop in one of the tests, and the whole suite stopped.

That's kind of lame, but at least it's predictable I guess. Anyone know
if this behavior is formalized, guaranteed not to change in a future
version?

(I'm using NUnit 2.2.0)



Chris Durkin wrote:
> Greetings,
>
> Does anyone know what the threading model is for NUnit tests and test
> fixtures? Does each fixture get its own thread? Do all the tests for a
> fixture run on the same thread?
>
> If I had to guess, I'd say yes to both, but it's hard to tell for sure
> due to skimpy documentation. I guess if noone knows maybe I'll do the
> work and figure this out, then post back. It would be nice to get a
> quick answer though.
>
>
>
> Thanks,
> Chris


Tim Haughton

2005-09-16, 3:56 am

"Chris Durkin" <ineverreadthis@comcast.net> wrote in message
news:1126799491.032143.113830@z14g2000cwz.googlegroups.com...
> Actually it looks like the whole NUnit GUI runs on one thread. I put a
> loop in one of the tests, and the whole suite stopped.
>
> That's kind of lame, but at least it's predictable I guess. Anyone know
> if this behavior is formalized, guaranteed not to change in a future
> version?


Tests should be repeatable (predictable) and atomic. Running concurrent
tests might cause unpredictability. Do you have a need for concurrent tests?

--
Regards,

Tim Haughton

Agitek
http://agitek.co.uk
http://blogitek.com/timhaughton


Tim Haughton

2005-09-16, 3:56 am

There are also rumblings on this subject on timeouts on the Wiki.

http://nunit.com/devwiki.cgi?TimeoutAttribute

--
Regards,

Tim Haughton

Agitek
http://agitek.co.uk
http://blogitek.com/timhaughton

"Chris Durkin" <ineverreadthis@comcast.net> wrote in message
news:1126799491.032143.113830@z14g2000cwz.googlegroups.com...
> Actually it looks like the whole NUnit GUI runs on one thread. I put a
> loop in one of the tests, and the whole suite stopped.
>
> That's kind of lame, but at least it's predictable I guess. Anyone know
> if this behavior is formalized, guaranteed not to change in a future
> version?
>
> (I'm using NUnit 2.2.0)
>
>
>
> Chris Durkin wrote:
>



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com