Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unit testing in Visual C# 2010 Express?

Does Visual C# 2010 Express have a unit testing feature?

like image 894
user128807 Avatar asked Aug 06 '10 13:08

user128807


People also ask

How do I run a unit test in Visual Studio?

Run tests in Test Explorer If Test Explorer is not visible, choose Test on the Visual Studio menu, choose Windows, and then choose Test Explorer (or press Ctrl + E, T). As you run, write, and rerun your tests, the Test Explorer displays the results in a default grouping of Project, Namespace, and Class.

What is unit testing C?

A Unit Testing Framework for C CUnit 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. CUnit is built as a static library which is linked with the user's testing code.

How do I automate unit testing in Visual Studio?

To generate unit tests, your types must be public. Open your solution in Visual Studio and then open the class file that has methods you want to test. Right-click on a method and choose Run IntelliTest to generate unit tests for the code in your method. IntelliTest runs your code many times with different inputs.

How do I run a CPP unit test in Visual Studio?

Right-click your solution and choose Add > New > Project. Click the Visual C++ category, and choose the Test sub-category. Select Native Unit Test Project, give the project a descriptive name, and then click OK.


2 Answers

As has been stated, the Express versions do not have any built-in, and do not allow add-ins for, this functionality, but you can use an external tool, e.g. NUnit.

You can also set up a command to run from the 'Tools->External Tools' menu option from within Visual Studio Express and run your test runner from that if you wish.

Here is a link that shows how to do it with VS C# 2008 Express, (scroll down to the end) but I think it should hold true for 2010 as well.

Here is a new working link.

like image 63
Andy Avatar answered Sep 27 '22 20:09

Andy


Nothing built in, but you can always use nUnit with it.

MSTest comes bundled with the Pro edition and above.

like image 20
Oded Avatar answered Sep 27 '22 20:09

Oded