Automated Testing with Coded UI Tests
Automated tests of the user interface (UI) are known as coded UI tests. These tests provide functional testing of the UI and validation of UI controls. You can create coded UI tests to determine that the UI is functioning correctly after code changes.
Coded UI tests are often used in Visual Studio solutions to quickly verify correct code functionality and as a quality gate prior to checking in code changes. Coded UI tests can complement the unit tests in a Visual Studio solution. For more information, see Use UI Automation To Test Your Code and Unit Test Your Code.
You can also create coded UI tests to automate manual tests that you created in Microsoft Test Manager. These automated manual tests can then be included in your Team Build configurations as part of your integration testing.
- Visual Studio Enterprise
|Creating an Automated UI Test from an Existing Manual Test: Create an automated UI test from an existing action recording from a manual test case.||- Generating a Coded UI Test from an Existing Action Recording
- - How to: Create an Action Recording
|Record User Actions to Create an Automated UI Test: Record the user actions that you want to use to create an automated UI test and generate the code for a coded UI test from this recording. You can then add custom code to your coded UI test using the Code Editor, or by using the Coded UI Test Editor.||- How to: Generate a Coded UI Test by Recording the Application Under Development
- Walkthrough: Creating, Editing and Maintaining a Coded UI Test
- Making Coded UI Tests Wait For Specific Events During Playback
- How to: Record Mouse Hovers in Coded UI Tests
- How to: Select a Control Using the Keyboard in Coded UI Tests
- Using HTML5 Controls in Coded UI Tests
- How to: Use UI Control Actions and Properties in Your Coded UI Tests
- Editing Coded UI Tests Using the Coded UI Test Editor
|Add UI Controls and Validation to Your Automated UI Test: Add UI controls to your coded UI test and verify the values and the properties of the controls using the Coded UI Test Builder.
If you are testing a large application, you might have to use multiple UI maps to help create your coded UI tests.
|- How to: Add UI Controls and Validation Code Using the Coded UI Test Builder
- Using HTML5 Controls in Coded UI Tests
- Anatomy of a Coded UI Test
- Testing a Large Application with Multiple UI Maps
|Add Parameters from a Data Source to Use with Your Coded UI Test: Make your coded UI test into a data-driven test by adding a data source for your test method and using the test context to run the test method for each set of data in your data source.||- Creating a Data-Driven Coded UI Test|
|Link Test Cases to User Requirements: Link your automated UI tests to user requirements. You can then determine how many automated tests you have for your user requirements.||- How to: Add Product Backlog Items, User Story, or Requirements Work Items to Your Test Plan|
|Edit coded UI tests using the Coded UI Test Editor: The Coded UI Test Editor lets you easily modify your coded UI tests. Using the Coded UI Test Editor, you can locate, view, and edit your test methods, UI actions and their associated controls in the UI control map.||- Editing Coded UI Tests Using the Coded UI Test Editor|
|Running Automated UI Tests: Run coded UI tests directly from Visual Studio, from Microsoft Test Manager, from Team Foundation Build. Coded UI tests have to interact with the desktop when you run them, unlike other automated tests.||- Running Automated Tests Using Microsoft Visual Studio
- Run tests in your build process
- Running automated tests from the command line
- How to: Set Up Your Test Agent to Run Tests that Interact with the Desktop
- Can I include coded UI tests in load tests?
- Analyzing Coded UI Tests Using Coded UI Test Logs
|Adding Support for Custom Controls: The coded UI testing framework does not support every possible UI and might not support the UI you want to test. For example, you cannot immediately create a coded UI test of the UI for Microsoft Excel. However, you can create an extension to the coded UI testing framework that will support a custom control.||- Enable Coded UI Testing of Your Controls
- Extending Coded UI Tests and Action Recordings to Support Microsoft Excel
|Best Practices for Coded UI Tests: Write coded UI tests that reduce the effect of a changing UI on the program under test.||- Best Practices for Coded UI Tests|
If you want to verify which configurations are supported for coded UI tests, you can find the current list of operating systems, browsers, and supported technologies.