Software QA FYI - SQAFYI

Test Automation Using Visual Studio 2010 Coded UI

By: Raj Kamal

You can use Visual Studio 2010 Ultimate or Visual Studio 2010 Premium to create automated tests of the user interface (UI) known as coded UI tests. These tests provide functional testing of the UI and validation of UI controls. Automated UI tests enable you to test that the UI is functioning correctly after code changes. Coded UI tests are quicker to run than manual tests, meaning that you can run them more frequently.

This article provides test automation guidance that helps you leverage the coded UI features of Visual Studio 2010 to foster a continuous, consistent and standard automation approach. Such an approach allows you to build, deploy and test, taking advantage of Visual Studio Lab Management features, which let automation testers reap the benefits of integrating with the build process for automatic build deployment, executing on VMs and reporting test automation results as part of Microsoft Test Manager (MTM).

Before walking you through an example that illustrates the coded UI automation process, let's cover some basics.

Test Automation Using Visual Studio 2010
Automating your tests is just one part of the test automation process. You also need to automate the build process and provide automatic installation and deployment. Automating each part of the test automation process eliminates the need to trigger automation manually because of build and deployment dependencies.

The automated build, deploy and test framework also enables you to find out the build quality at the earliest opportunity by publishing the test results for every run against a new build. You can choose to run only the test suites that are most important for your continuous builds, since too many tests can delay the completion of a build. Make sure that you run these tests for the current iteration.

Here are the steps in the build, deploy and test workflow:
* Choose the virtual environment you want to use.
* Select a snapshot for that environment to use as your starting point for deployment.
* Select the build definition or the build to use to deploy your application.
* Add scripts that will deploy the application from the drop folder.
* Select the test suites, test configuration and test settings for your test run.

Figure1 shows the topology required for setting up the build, deploy and test environment using Visual Studio components such as Build Controller and Test Controller and a virtual environment for deployment and execution.

Full article...


Other Resource

... to read more articles, visit http://sqa.fyicenter.com/art/

Test Automation Using Visual Studio 2010 Coded UI