What is a unit testing system?

I wondered which unit testing platform would be good, with which you are really familiar? I know this may be a matter of opinion, but I thought I would ask anyway. I know that I will need to do this someday so that I can learn how to use it. I know that there are many, but which one is effective for developing C #?

From this question, I see that unit testing is necessary, but I personally have not used it. Therefore, I ask this question.

+64
c # unit-testing
Feb 14 '10 at 17:52
source share
7 answers

I would go with NUnit .

Some links: NUnit QuickStart , NuGet Package

+39
Feb 14 '10 at 17:53
source share

Personally, I prefer the Visual Studio Unit Testing Framework for two main reasons:

  • It integrates seamlessly with the IDE;
  • This is another dev deployment program.

Having said that virtually the entire unit testing infrastructure will do the trick, it's important to have tests!

+46
Feb 14 '10 at 17:58
source share

Do not get hung up on choosing a frame. Just select one and start testing - they are not so different. When you write tests for a while, you will know what to look for, according to your needs.

Personally, I found xUnit , Testdriven.Net, and Moq to be a very flexible set of testing tools.

Also see this post: NUnit vs. MbUnit vs. MSTest vs. xUnit.net

+31
Feb 14 '10 at 18:02
source share

I decided to stick with NUnit because ReSharper provides built-in IDE support (which saves a lot of time). It is also supported by TeamCity when running and sending automated test reports.

+5
Feb 15 '10 at 9:27
source share

I use NUnit for the testing platform and ReSharper for its integration into VS (and everything else that ReSharper does).

+2
Feb 14 '10 at 18:11
source share

Use MbUnit (with Gallio), NUnit, MsTest, or xUnit. You can combine several unit tests. I am using NUnit for TDD

+1
Feb 14 '10 at 18:51
source share

There are several reasons for testing, which means several test environments. In addition, there are test levels such as simple, stubs, and layouts. For example, you can check behavior, not state.

As for the function, I usually use the installation built into Visual Studio, add a link to the NUnit DLL, and change the C # annotations to NUnit. This is due to the fact that I like to test outside of Visual Studio, especially when others participate in my team (and we have not yet bought the VS team release).

0
Feb 14 '10 at 18:05
source share



All Articles