Coded UI Test – New Extensibility QFE

Shubhra Maji MSFT

Coded UI Test team has developed an extension model for enabling custom control identification, record and playback of automation tests using Coded UI Test. This hotfix will be available on top of Microsoft Visual Studio 2010 Service Pack 1 (SP1). The experience while writing a new plugin for custom controls has now become much simpler and straightforward. With this hotfix, customers will now be able to add a plugin for a custom Windows Forms / Windows Presentation Foundation / ASP .Net control within minutes with our new set of APIs, an extension effort that would have taken days using the previous extension model.

With the earlier extension, one could add the same level of customization but through a bulk of complex implementation. Hence, writing a plugin from scratch looked to be a humongous task. We have realized this pain borne by customers and partners and hence, we wrapped the bulk of processing into a proxy technology manager while exposing only a limited set of overrides.

Brief about the new abstract classes introduced

–     UITechnologyElementProxy – As an example, user can modify QueryId (which shows up as a set of property conditions on the UIMap) to add extra conditions or modify existing ones. These conditions could be extra automation attributes. Customers can also use this to add more accessible hierarchy information to the UIMap files

–     UITechnologyManagerProxy – Users can register their technology manager with the proxy technology manager

Consider a case where you are trying to test a control with Coded UI Test and everything looks good except for one or two minor glitches e.g. changes to bounding rectangle of the control, or overriding GetHashCode() etc. With the previous extension model, you could solve the problem by writing plugin and overriding the intended method. But, at the same time you would have had to override several other methods to get the plugin working which would take days to stabilize. With the new extensions, you can get the same work done by overriding only the intended method(s).

Consider another case where you have developed a custom control and figure that Coded UI Test does not automate actions on the control. It only plays back co-ordinate clicks. You can now implement the extension to customize a control’s search properties to automate actions on it using Coded UI Test in 9 simple steps as described in the hotfix details here:

http://support.microsoft.com/kb/2696646


P.S. We have already used this QFE to resolve couple customer issues by developing plugins instantly. Also, third party control vendors are finding these new extensions extremely helpful because it helps them expedite their work towards adding Coded UI Test support.

0 comments

Discussion is closed.

Feedback usabilla icon