Nunit [TestsFixtures] should run independent

Surfing the blogs I found James Newkirk's, one of the writers of NUnit.

Some months ago while I was in Mexico showing how NUnit works someone asked me about the independence of each test and the order of execution. Since I didn't know the answer, I answered this guy basing on my experience with JUnit: “I THINK they run independent and the order is not relevant”. However, I had to step back after writing an example fixture.

Now I found this post of James where he talks about this issue.

In conclusion: They wrote it wrong. Each testfixture is created and share the member variables defined in the fixture. This is good if you want to do functional testing and not unit testing because you can test a workflow and share state between test methods. However, the order of the methods is never configured, making it unusable for functional testing. To make the long story short, Charlie Poole, who is the guy in charge of NUnit is asking whether we want testfixture to run independent or not. I VOTE YES! MAKE IT WORK THE SAME AS JUNIT IF YOU WANT A UNIT TESTING FRAMEWORK!

Published: December 21 2004

blog comments powered by Disqus