Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [nunit]

For questions about NUnit, an open source unit testing framework for Microsoft .NET.

1
vote
1answer
34 views

NUnit specify TestCaseAttribute on implementation or create a test method

Based on this question about the correct usage of nUnit's TestCaseAttribute, I was wondering whether to specify the test case directly on the implementation or create test methods (as when using ...
4
votes
5answers
553 views

Newbie question: 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, ...
0
votes
1answer
77 views

Should I be duplicating Equality methods in the test project?

I have read plenty of questions on here about overriding .equals and .hashcode for testing purposes only. My Domain classes have implemented .equals and .hashcode. Should I be 1) Duplicating these ...
2
votes
1answer
4k views

How to prepare for INTERVIEW with PAIR PROGRAMMING (C#) [closed]

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 ...
7
votes
1answer
692 views

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 ...
0
votes
1answer
808 views

Selenium-Nunit Program Structure

My office has a suite of web reporting engines written in VB. All in all there's about 300 reports with varying displays depending on the data being input into them. I'm trying to establish an ...
5
votes
5answers
2k views

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 ...
39
votes
13answers
17k views

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 ...
1
vote
1answer
2k views

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 [...
9
votes
3answers
8k views

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 ...
6
votes
3answers
818 views

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 ...
16
votes
5answers
9k views

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'...
1
vote
1answer
174 views

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 ...
3
votes
3answers
1k views

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 ...
7
votes
3answers
376 views

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 ...
6
votes
3answers
177 views

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 ...
26
votes
4answers
23k views

What is the best unit test framework for .NET and why? [closed]

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 ...
12
votes
3answers
3k views

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 ...