Visual Studio 2010 RC – What’s new in Coded UI Test

The Release Candidate (RC) version of Visual Studio 2010 has been released by Microsoft and is now available for download. From a tester’s point of view, Visual Studio 2010 Beta is a revolutionary step from Microsoft with a bunch of new stuff in Coded UI test for automation testers.

Visual Studio 2010 RC made some significant improvements of which I chose following:

Pause playback to wait for certain event

This capability was not available in VS 2010 Beta 2 and it was noticeably lacking. For example, it was impossible to wait for the form, message, progress bar to disappear etc.

This was accomplished with a modification of the UITestControl class. In the RC, you can use the appropriate UITestControl methods from the list.

1. WaitForControlReady() – This waits for the control to be ready to accept mouse/keyboard input.
2. WaitForControlEnabled() – This waits for the control to be enabled.
3. WaitForControlExist() – This waits for the control to exist on the UI.
4. WaitForControlNotExist() – This waits until the control ceases to exist on the UI.
5. WaitForControlPropertyEqual(string propertyName, object propertyValue) – This waits for the specified property of the control to have the given value.
6. WaitForControlPropertyNotEqual(string propertyName, object propertyValue) – This waits for the specified property of the control to not have the given value.
7. WaitForControlCondition(Predicate conditionEvaluator) – This waits until the specified predicate returns true.

 

Also, the namespace Microsoft.VisualStudio.TestTools.UITesting have 3 new namespaces which provide classes that represent HTML, WinControls, WpfControls respectively within the framework.

More importantly, all controls are now available across a whole solution.

Multiple UI Maps are now supported. Previously a Coded UI Test Project could have only one UI Map file. Now, we allow the addition of multiple UI Maps to enable test projects to scale up to real world applications. Also, this will enable multiple UI automation engineers to work simultaneously on the test project without running into merge conflicts.

All accessed objects and actions performed during recording sessions were stored in UIMap.Uitest.xml and this file was used for code re-generation in the UIMap.Designer.cs file. However, in order to customize recorded actions or objects, a user has to modify either UIMap.Designer (you must be familiar with file structure) or the UIMap.cs file as a part of partial class UIMap.

In the cases of modifications and creating a lot of tests in one project, the UIMap file got cluttered and so big that it was really necessary to exercise your skills in using other IDE features for searching. Furthermore, the UIMap file would contain logically different methods for different tests. Opposite to partial class definition, it was impossible to split UIMap class into multiple individual files.

Specialized classes (e.g., HtmEdit) are now part of the product binaries instead of the UserControls.cs file generated earlier.

In Visual Studio 2010 Beta 2, all controls used in test were stored in Usercontrols.cs and this file was project specific. In order to use custom control, user should add that class to all projects within solution.

Tags: ,

4 Responses to “Visual Studio 2010 RC – What’s new in Coded UI Test”

  1. Pause Playback in Coded UI Tests | Dieter Bremes's Blog Says:

    [...] post with information about new features in coded UI testing that will save you a loop or two is here. This entry was posted in Uncategorized and tagged Coded UI Test. Bookmark the permalink. [...]

  2. keshav Says:

    Hi All,
    What is new in coded ui apart from QTP could you please give some referenes.and please find the following link and try to resolve the issues asap

    Thanks in advance

    https://spreadsheets.google.com/ccc?key=0Al382q6hOIGzdHFrSzhEYjFiR1N5LVB4TmdGT3pWbmc&hl=en#gid=0

  3. Predrag Maricic Says:

    Keshav,

    Thank you for your question. Please take a look at your spreadsheet.

    Regards,
    Predrag Maricic

  4. keshav Says:

    HI,

    Thanks for giving the reply.its very useful for me. if i have any queries i will let u know.thanks
    Keshav

Leave a Reply