Learn to use Visual Studio, Visual Studio Online, Application Insights and Team Foundation Server to decrease rework, increase transparency into your application and increase the rate at which you can ship high quality software throughout the application lifecycle
More videos »
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:
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.
Nice work, let's hope third parties like Infragistics start to support Coded UI tests ...
I wish legacy vendors like Unisys and IBM would implement such things. Using other toolsets or home grown automation frameworks is really a pain sometimes. It looks cool though.
Are there any examples we can view or download? The "9 simple steps as described in the hotfix" are neither simple nor described.
I have a question regarding Step 4:
<PropertyCondition Name=" <Custom_property_name>">Custom_property_value</PropertyCondition>
is above line does anything?
when I put with my custom properties this I am not able to compile code
In step 4: is below line necessary it gives me compilation errror