Does Visual C# 2010 Express have a unit testing feature?
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.
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.
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.
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.
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.
Nothing built in, but you can always use nUnit with it.
MSTest comes bundled with the Pro edition and above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With