Visual Studio Coded UI Tests - Imaginet Visual Studio and TFS consulting services

In our previous blog post video entitled “Getting Started with Visual Studio’s Coded UI Testing”, we had some really great questions posed.  Below are the responses to those questions and some of the resources that apply to each answer.

1) Are Third-Party controls supported?

If you’re doing web-based controls the answer is generally yes, however in some cases it may be difficult.  For all third-party controls the level of support depends upon on the implementation of the control vendor.  More recent releases of controls will have better support.

Here are some references for some of the popular control vendors and Microsoft:

2) Does it support multi-windows automation?

Yes, as long as those windows can be identified.

3) So it converts only if you’re recording manual steps?

If you use a manual test as the source, you will generally need an action recording to convert into a coded UI test; that is, you need to record the manual steps. If you are starting from scratch, you can use the coded UI test builder to record steps. If you don’t want to record the steps, you can hand-code directly using the Coded UI Test object model and/or by using one of the extended framework.

4) Can you also show which libraries are being used by a default for coded UI tests and explain these libraries?

Basic answer: If you create a project you will see those and you can go into the standard MSDN document and see all the details below that.

Reference: http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.testtools.uitesting.aspx

5) Can we add customizations and a few more validations in the comparator while adding assertions?

Yes, while I was adding to the UI test builder, I can batch together related items. I can either do a bunch of actions at a time, or a bunch of validations at a time and then when I generate the method I can verify a bunch of things.

6) Can you explain the search speed test time out?

The SearchTimeout property for the playback settings specifies the amount of time the test will search for a control before it times out and fails as not being able to find the control. If controls are rendered on a page over time, the search may start before the control has actually appeared and if it takes too long the test will fail.

Reference: http://msdn.microsoft.com/…/microsoft.visualstudio.testtools.uitesting.playbacksettings.searchtimeout.aspx

7) Can we add properties to the existing controls in the control map?

Yes. You can do this programmatically as well. In the code you can actually say there’s a control out there but add a search property to it or remove a search property so you can dynamically manipulate these search properties at run time using code. Or you can do it at design time.

8) Can we convert QTP scripts to Coded UI?

Not exactly, not directly. One thing that I’ve heard people had some success with is actually playing back the QTP scripts the same time you’re recording. I would be a little wary about doing that but you can definitely try it and that would give you part of the solution but not all the solutions because it’s not conversion. It’s actually trying to create a new coded UI test based on what is happening in the QTP script. Even if you are successful you will still need to re-add the verification steps manually.

9) Can we used shared methods to re-use across different tests?

Yes. You can generate tests using the coded UI test builder and then write your own tests using what has already been generated from the coded UI test builder. At that point it’s just code and in Visual Studio you have a best in breed tool set and framework for working with code.

Ready to Get Started with Visual Studio Coded UI Tests?

If you’re ready to get started with Visual Studio coded UI tests but not sure where to start, Imaginet is here to help. Our Imaginet certified Visual Studio and TFS experts have been working with the Microsoft TFS and ALM tools since they originated in 2005 and can help you get started with any of your Visual Studio, TFS, or ALM initiatives. To find out more, schedule your free consultation call with Imaginet today.

 

Request Your Free Consultation

=====

Imaginet is your trusted technology partner who turns your business innovation ideas into reality. 20+ years | 1200+ satisfied customers | 2500+ successful engagements. Primary services include Web Application Development, Mobile App Development, and SharePoint consulting services, with additional specialties in Power BI & Business Intelligence, Office 365, Azure, Visual Studio, TFS, & VSTS, Skype for Business, and more. Located in the United States (Dallas, TX) and Canada (Winnipeg, MB) with services offered worldwide. Contact us today at info@imaginet.com or 1-800-989-6022.

Imaginet

About Imaginet

Imaginet is your trusted technology partner who turns your business innovation ideas into reality. 20+ years | 1200+ satisfied customers | 2500+ successful engagements. Located in the United States and Canada. Services offered worldwide. Contact us today at info@imaginet.com or 1-800-989-6022.

Let‘s Talk.
  • Let's Talk

  • This field is for validation purposes and should be left unchanged.