Case Study

Building a Custom Automation Framework with Visual Studio Coded UI

Background

Our client needed an automation solution to perform regression testing on their new data forecasting .NET application, which used third party Infragistics controls extensively. After having their in-house resources try to implement a functional test automation tool unsuccessfully, the company sought a trusted vendor with the expertise to automate the testing of their new application.

They required proven expertise in test automation and the ability of an engineer to work as an extension of their team on-site. Our client contacted us to assist in this new undertaking, and they were looking to use Visual Studio’s Coded UI tests to automate their new application.

Challenges

The challenge of the previous test automation effort was that the tool used was not able to recognize the Infragistics control. This posed a significant issue for the project, and the client’s team first tried to compensate for the object recognition problems using the testing tool’s pixel matching capabilities to navigate and collect data from the Infragistics controls. This led to inconsistent test runs and continuous maintenance problems with the automated tests that were created.

They realized that they were in need of a consulting vendor that had experience with a functional testing tool which could recognize the Infragistics objects. In addition, the complexity of the application’s user interface meant that the client would need a test automation framework that would allow their resources to easily create and maintain tests.

RTTS’ Strategy

We worked with the client to determine their exact needs, and then sent over a member of the RTTS team to implement Microsoft Visual Studio Coded UI tests to automate their data forecasting application.

Infragistics provides an add-on to Visual Studio that allows Coded UI tests to recognize the Infragistics controls. Therefore, we came up with a strategy to use Coded UI to build out a comprehensive framework and to make test creation straightforward and easy to maintain. Our client had a few team members that were experienced in the C# programming language but had no experience with Coded UI tests, so once a framework was in place with sample tests created, we formulated a strategic transition plan to show the client how the framework can be modified and how tests can be created using that framework.

Solution

We created Coded UI tests for two of their applications that were used for Inventory Forecasting. We also designed custom-built reusable navigation methods that allowed for seamless creation of new Coded UI tests. These methods presented enhanced functionality when working with every type of Infragistics control. They were designed to be used in any test and provided immediate benefits to our client’s team. All of the methods that were developed (along with detailed descriptions, parameters, and notes) were compiled into a comprehensive help file that was made to function as a resource for the client’s team moving forward.

In order to ensure knowledge transfer after the conclusion of our engagement, we hosted training sessions for the client’s team where we illustrated how the methods were used and how they can be customized as their project expands. We first delivered a formal class in the Coded UI test basics over the period of two days. Two additional days were dedicated to reviewing the specific features that were needed to handle the unique challenges in working with their application.

Benefits

The client’s new automation framework now allows them to easily build and maintain functional Coded UI tests for their application. Their team has the knowledge to create new Coded UI tests and self-maintain their existing regression suite. They have been able to drastically reduce test creation times by using the framework we built for them. This framework is now being used to access and manipulate all the Infragistics objects that are used in their application.