For questions about NUnit, an open source unit testing framework for Microsoft .NET.
Questions tagged [nunit]
22 questions
40
votes
13 answers
How do we make unit tests run fast?
We have reached the point in our project where we have almost a thousand tests and people have stopped bothering with running them before doing a check in because it takes so long. At best they run the tests that are relevant to the piece of code…

Ziv
- 2,946
- 5
- 23
- 26
26
votes
4 answers
What is the best unit test framework for .NET and why?
It seems to me that everyone uses NUnit without even considering the other options. I think this is because:
Everyone is familiar with it already so they won't have to learn a new API.
It is already set up with their continuous integration server…

Nobody
- 2,613
- 1
- 22
- 25
16
votes
5 answers
How to structure unit tests for a GUI app using C# and NUnit
I've been asked to do a small side-project to supply a simple application to one of our customers. Normally I would be working on back-end code where I have all of my testing needs figured out, and I've not yet had the dubious pleasure of writing…

S.Robins
- 11,385
- 2
- 36
- 52
12
votes
3 answers
How does NUnit for C# compare with Unit Test facility integrated with Visual Studio
I need to work in a team to develop a mid scale Desktop application developed using C# .NET. Prior to this, I have not applied Unit Testing and Test Driven Development. I am aware that there exists many tools and framework for Unit Testing C#…

Shamim Hafiz - MSFT
- 4,123
- 7
- 38
- 46
12
votes
3 answers
Where should I draw the line between unit tests and integration tests? Should they be separate?
I have a small MVC framework I've been working on. It's code base definitely isn't big, but it's not longer just a couple of classes. I finally decided to take the plunge and start writing tests for it(yes, I know I should've been doing that all…

Earlz
- 22,658
- 7
- 46
- 60
7
votes
3 answers
Long-Term Strategy For Implementing a QA System?
I have been given the task of implementing some QA testing into a massive existing system. We're going to start out with system-level tests and might add unit tests if it is deemed necessary.
I don't really know where to start. I'm thinking of…

sooprise
- 1,065
- 2
- 12
- 17
7
votes
1 answer
Should the expected value be hard-coded into the Assert
My own personal preference would be to use a variable, but maybe there are reasons against this? I haven't been able to find any resources that state the pros or cons of using one of these over the other.
Option 1:
[TestClass]
public…

Erik Philips
- 290
- 1
- 10
7
votes
3 answers
BDD in .NET - Chicken or Egg or..?
Predicate: I'm brand new to BDD / TDD, but I've done my homework.
I'm trying to put everything I've read / learned into practice with VS2010, SpecFlow and NUnit. Things are working, but it's quickly becoming a chicken / egg scenario within a blur of…

Tom Tom
- 173
- 4
6
votes
3 answers
Dealing with resistance to testing code
I've recently switched jobs. At my previous job, everyone wrote tests and we were all in a happy place. In my new role, I've been asked to setup CI and testing.
I'm experiencing some resistance to testing from some developers and wondered if…
Gilbert Liddell
6
votes
5 answers
How can I test parts of my application against the output of third party application?
I have a fairly new C# application, approximately 6 months old, that we are now trying to incorporate testing into. (Should have been done from the start but I can't change the past)
Parts of this application involve pushing some documents out to a…
user78252
5
votes
5 answers
Should all class public methods come from an interface?
I'm currently learning about TDD techniques, one of the suggestion is to test only public methods and skip the private ones. I have also been reading about Mocking. If I want to mock a certain method, then it needs to come from an interface or be…

ArturoO
- 167
- 4
3
votes
3 answers
Making Separate Assemblies For Different Types Of Tests For The Same Component?
I was told by a few members here that splitting up my unit tests into different assemblies for different components is the best way to structure unit tests. Now, I have a few questions about that idea.
What are the advantages of this?…

sooprise
- 1,065
- 2
- 12
- 17
3
votes
2 answers
NUnit SetUp and TearDown
I have some experience in MS Test but new to NUnit.
Whether NUnit [Setup] is corresponding to [ClassInitialize] or [TestInitialize] in MS Test?
What is the NUnit attribute corresponding to…

LCJ
- 977
- 2
- 13
- 23
2
votes
1 answer
How to prepare for INTERVIEW with PAIR PROGRAMMING (C#)
I have a stage in an interview process where I am supposed to do pair programming, or at least they want to see me working in Visual Studio with an experienced developer. This is a company promoting Scrum.
How should I behave?
How should I…

Learn Languages From Music
- 47
- 1
- 4
1
vote
1 answer
Interested in Feedback on QA System Design
I'm in the beginning phases of creating a QA system and I want to make sure that the design decisions that I'm making now make sense and won't bite me in the butt later on. If you have even the slightest nit-picky thing or whatever, please post,…

sooprise
- 1,065
- 2
- 12
- 17