Developer testing tools, scenarios, and capabilities
Maintain code health with unit testing. Visual Studio provides a wide range of powerful tools and techniques for developers to use when testing applications:
Avoid regressions and achieve code coverage with IntelliTest
In traditional unit test suites, each test case represents an exemplary usage scenario, and the assertions embody the relationship between the input and output. Verifying a few such scenarios might well be enough, but experienced developers know that bugs lurk even in well-tested code, when correct but untested inputs provoke wrong responses.
Improve coverage, and avoid regressions with IntelliTest. IntelliTest dramatically reduces the effort to create and maintain unit tests for new or existing code.
- Introduction to IntelliTest with Visual Studio
- IntelliTest – One Test to rule them all
- IntelliTest Videos
- Get Started with IntelliTest
- IntelliTest reference manual
User interface testing with Coded UI and Selenium
Test your user interface (UI) with best of breed or community approved UI Testing. Coded UI tests provide a way to create fully automated tests to validate the functionality and behavior of your application’s user interface. They can automate UI testing across a variety of technologies, including XAML-based UWP apps, browser apps, and SharePoint apps.
Whether you choose best of breed Coded UI Tests or generic browser based UI testing with Selenium, Visual Studio provides all the tools you need.
- Use UI Automation To Test Your Code
- Get started creating, editing and maintaining a coded UI test
- Test UWP apps with Coded UI Tests
- Test SharePoint Applications with Coded UI Tests
- Introduction to Coded UI Tests with Visual Studio Enterprise (Lab)
Effective unit testing with Visual Studio Code Coverage
To determine what proportion of your project’s code is actually being tested by coded tests such as unit tests, you can use the code coverage feature of Visual Studio. To guard effectively against bugs, your tests should exercise or ‘cover’ a large proportion of your code.
Code coverage analysis can be applied to both managed and unmanaged (native) code.
Code coverage is an option when you run test methods using Test Explorer. The results table shows the percentage of the code that was run in each assembly, class, and method. In addition, the source editor shows you which code has been tested.
- Using Code Coverage to Determine How Much Code is being Tested
- Unit Testing, Code Coverage and Code Clone Analysis with Visual Studio (Lab)
- Customizing Code Coverage Analysis
Unit testing with any framework using the high performance Test Explorer
Test Explorer help developers create, manage, and get maximum benefit from unit testing.
- Get started with Unit Testing
- Run unit tests with Test Explorer
- Writing Unit Tests for C/C++
- Install third-party unit test frameworks
Visual Studio is also extensible and opens the door for third-party unit testing adapters such as NUnit and xUnit.net. In addition, the code clone capability goes hand-in-hand with delivering high quality software by helping you identify blocks of semantically similar code which may be candidates for common bug fixes or refactoring.