Create and run unit tests for a Store app in Visual Studio

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

The Visual Studio 2012 Express for Windows 8 unit test tools are designed to support developers and teams who incorporate unit testing in their software development practices. Unit tests give developers and testers an efficient, maintainable way to look for logic errors in the methods of classes in Visual C#, Visual Basic, and Visual C++ projects.

Note

The topics in this section describe the functionality of Visual Studio 2012 Express for Windows 8. Visual Studio Ultimate, VS Premium, and VS Professional provide additional features for unit testing.

  • In VS Ultimate, VS Premium, and VS Professional you can use any third-party or open source unit test framework that has created an add-on adapter for the Microsoft Test Explorer. You can also analyze and display code coverage information for your tests with VS Ultimate and VS Premium.

    • In VS Ultimate, you can run your tests after every build. You can also use Microsoft Fakes, an isolation framework for managed code to focus your tests on your own code by substituting test code for system and third-party functionality.
    • JavaScript. JavaScript unit testing is not available from the IDE of Visual Studio Express for Windows 8. In Visual Studio Professional, Premium and Ultimate, JavaScript unit test frameworks are available as extensions in the Visual Studio Gallery. You can also test JavaScript code by using one of the stand-alone third-party or open source JavaScript unit test frameworks.

    For more information, see Unit Test Your Code in the MSDN Library.

In this section

Unit test C# code

Unit testing a C++ DLL

Run unit tests in Test Explorer