Skip main navigation

Using Coded UI & Using Test Manager

.

In the previous step, we introduced test automation and using Selenium for automating your tests. In this step, we will explore functional test automation and using coded UI for functional testing.

What is Functional Testing

Functional testing is the process of verifying that your application does what it is designed to do. With functional testing, you want to test each functional element of your software to verify that the output is correct. It is more important to test what the system does rather than testing how it does it. To achieve this, you need to interface with a User Interface (UI).

Functional Test Automation with Coded UI

Functional test automation allows DevOps teams to treat functional, UI-oriented tests, similarly to unit tests with automation. Unlike unit tests, functional UI tests require that the application is deployed to an environment. And unlike manual testing, UI-coded functional tests allow you to short-circuit the application layers (if needed) to insert or validate data.

Coded user interface testing can be employed in several schemes:

graphical representation of the schemes used for coded user interface testing. This graphic shows the F5 experience, typical non-CUIT test, Typical use of CUITs, and tests that verify the user interface

Many frameworks support coded UI tests, including:

  • Microsoft Visual Studio Coded UI Test
  • Telerik Progress Studio UI Test
  • Selenium browser automation

Other tools are only intended to be standalone functional test platforms, so pipeline integration is outside the scope of this topic.

Alternatives tools include:

  • Microsoft Test Manager and Microsoft Lab Manager
  • IBM Rational Functional Tester
  • HP Unified Functional Testing (formerly QuickTest)

Adding CUIT Functional Test

Like other supported functional test automation options, Visual Studio Coded UI Tests may be added to a release pipeline. Adding CUIT functional tests to the release pipeline is a simple process, as follows:

  1. Open the release definition

  2. Add the PowerShell task to start test VMs

  3. Add the task Copy Test to copy tests to test VMs

  4. Add the task Deploy TestAgent to add test agents to the test VMs

  5. Add the task Run Tests

  6. Configure the Run Tests task. Set up authentication with computer name and IP. Note that you can do this with variables

  7. Add PowerShell task to shut down test VMs

graphical representation of the process to add CUIT functional tests to a release pipeline

If errors occur when running tests, you might see this message:

Automation engine is unable to playback the test because it is not able to interact with the desktop. This could happen if the computer running the test is locked or its remote session window is minimised.
If this occurs, consider using the Autologon tool to create the required interactive desktop.
Explore more information on:

Using Test Manager

Automating testing is essential in DevOps. Functional testing can be organised and set up for automation by using Microsoft Test Manager. Note that Test Manager can define environments for deployment, identify tests to run and automate deployment and testing through a Microsoft Lab Management template, but it does not integrate with a VSTS release pipeline.
Test Manager does have a place in supporting continuous integration, by:
  • Providing the ability to create and manage test suites and cases, which assists in creating comprehensive and holistic automated tests.
  • Determining the appropriate sequence of automated tests.
  • Using Test Manager to facilitate exploratory testing, especially to support user acceptance. Because these tests (and found defects) can be recorded, exploratory tests might be used as a foundation for expanding test automation.
  • Test Manager supports multiple functional testing platforms, such as Code UI and Selenium.
For more information on testing with Microsoft Test Manager, see https://msdn.microsoft.com/en-us/library/jj635157(v=vs.120).aspx
In the following step, we will learn about Availability and Performance Testing, but before you move onto this, please join the discussion.

Join the discussion

Coded UI tests include functional testing of the UI controls. They let you verify that the whole application, including its user interface, is functioning correctly. Discuss how this can be very useful where there is validation in the user interface and give an example of this.

Use the discussion section below and let us know your thoughts. Try to respond to at least one other post and once you’re happy with your contribution, click the Mark as complete button to check the step off, then you can move to the next step.

This article is from the free online

Microsoft Future Ready: Continuous Integration Implementation

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now