Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which free unit testing framework for C#? [closed]

I'm rather beginner in C# world (and .Net as well), so I decided to get some advices from more experienced developers. Which free unit testing framework for C# would you advise? I came across NUnit, which seemed to look interestingly, but in it's documentation I found out, that there were versions for .Net 1.1 and .Net 2.0. I need to use it in project targeted to .Net 3.0.

So, please let me know if:

  • I can use NUnit for .Net 3.0 project?

or:

  • there is something better than NUnit?
like image 507
oo_olo_oo Avatar asked Apr 10 '09 15:04

oo_olo_oo


People also ask

Does C have unit testing?

A Unit Testing Framework for CCUnit is a lightweight system for writing, administering, and running unit tests in C. It provides C programmers a basic testing functionality with a flexible variety of user interfaces.

What can be used for unit testing in C?

The most scalable way to write unit tests in C is using a unit testing framework, such as: CppUTest. Unity. Google Test.

Does Google test support C?

Google test, or gtest is an open source framework for unit testing C\C++ projects.

Which framework is used for unit testing?

JUnit is an open source framework you can use to write and run tests. It aims to help develop bug-free and reliable code written in Java. JUnit provides test runners that run tests and assertions to test the expected results.


2 Answers

Yes. NUnit works well on .NET 3.0 and 3.5 too.

Your second question is pretty subjective. NUnit is a widely used unit testing framework for .NET. MSTest is another one that is shipped with Visual Studio. xUnit is another one.

There is a comparison on xUnit project: xUnit - Comparing xUnit.net to other frameworks

like image 110
mmx Avatar answered Oct 01 '22 05:10

mmx


xUnit is worth a look (and is what I use the most), as is MbUnit.

like image 22
Kent Boogaart Avatar answered Oct 01 '22 05:10

Kent Boogaart