Telerik
Silverlight Test Automation with WebUI Test Studio
Home/Automated Testing Tools/Products/Silverlight testing

Microsoft Silverlight Test Automation

Powered by the .NET framework, Microsoft Silverlight is a robust platform for creating media experiences and rich interactive applications for the Web. Compatible with multiple browsers, devices and operating systems, Silverlight integrates multimedia, graphics, animations and interactivity into a single runtime environment.

The Challenges

While offering an exciting and quite promising alternative to Adobe Flash, the Microsoft Silverlight platform brings many questions and unknowns when it comes to securing the quality of the created Silverlight applications.

The Tools

User experience so far shows that Silverlight apps are not too responsive to the traditional UI testing techniques. There are few tools that offer test automation for Silverlight application:

  • Some coded frameworks offer Silverlight unit testing capabilities but are unable to provide reliable testing experience for real-life scenarios; 
  • Visual Studio’s UIAutomation allows functional tests of Silverlight applications; however, solid technical skills and knowledge are required.


When it comes to in-depth, easy and quick Silverlight UI automation of line-of-business applications, all the tools available in the market fail to answer users’ needs.

Telerik Silverlight UI Testing Solution

A pioneer in Silverlight UI components development, Telerik has amassed solid expertise in Silverlight which now transcends in the field of Silverlight test automation. Telerik is famous for being quick to support Microsoft Silverlight latest versions, and at the same time to provide full support for the older versions as well. Telerik WebUI Test Studio is the first solution on the market to deliver support for Silverlight UI automation and as such has been extensively used internally by Telerik Silverlight product teams in perfecting our UI components.

See below how Telerik WebUI Test Studio tackles these problems and what solutions it offers:

Complexity

Problem: The Silverlight platform is extremely powerful and complex which constitutes one of the major obstacles when it comes to test automation. Unlike HTML where you have limited number of elements, in Silverlight the object hierarchy might get quite complicated making it difficult for the user to understand the parent/child relationship of the elements in the application.

Solution: WebUI Test Studio recording surface offers multi-layer highlighting which allows users to see the original targeted node, and all the ones up in the hierarchy. These represent the different object layers - users can choose the selection box of the element they target for automation. The exposed verifications will be specific to that part of the object. The tool dynamically pulls value for each specific part thus allowing real time verifications.

Programming Knowledge

Problem: The automation of Silverlight applications through Microsoft UIAutomation or any coded framework involves adopting considerable scripting skills and knowledge. This means the learning curve for testers is rather steep when it comes to automating Silverlight applications.

Eventually, the result is slower development cycle, higher maintenance cost and lower ROI on testing.

Solution: WebUI Test Studio allows users to automate tests without having to revert to code in most of the scenarios. Such approach not only simplifies test automation but also makes test maintenance much easier. Further, recording Silverlight tests doesn’t differ from recording any HTML/AJAX app –no need to learn new technologies to be able to automate it.

Custom Controls Automation

Problem: When building real line-of-business applications developers sometimes need to extend the components they are using to build their applications. This results in a new element type in the application’s Visual Tree, which fails to identify the base control.
Solution: When WebUI Test Studio detects a custom control on the surface, it will automatically detect the base class that the control inherits from and show the quick tasks for that base control. This gives customers with applications that heavily utilize custom controls a richer out-of-box experience. What’s more, if you need to automate an application built with Telerik Silverlight controls, WebUI Test Studio will instantly detect them and suggest specific verifications even for complex data and navigation components.


Animations

Problem: Silverlight applications tend to be rich in graphical experience, interactivity and transition effects. While this is one of the main reasons for users to choose Silverlight for their line-of-business applications, the latter also gives testers hard times automating them – numerous UI widgets tend to fly-in, scroll up or expand.
Solution: WebUI Test Studio execution engine not only waits for an element to be visible, it also waits for the item to stop its animations. What’s more, the tool automatically detects if the element is in view, and if not, scrolls to make it visible. Only then, action is performed.

ChildWindows/Pop-ups Automation

Problem: Automating Pop-ups has always been a challenge for most automated testing tools. In Silverlight it is even more complicated because the popup controls are not part of the main Visual Tree–each of these has its own Visual Tree which is not accessible from the main application tree.
Solution: WebUI Test Studio recording surface allows users to detect Silverlight pop-ups and ChildWindows and connect to them. You can highlight elements within these Pop-ups, and record verifications against them, as well as navigate their Visual Trees in the DOM Explorer.

Virtualized Controls

Problem: In order to boost performance, many users incorporate Data Virtualization techniques into their applications, thus gaining the advantage of only having the UI Elements which are visible on screen generated and taking up memory. These methods however bring reliability issues for your automated tests. The index of a target item in the app will be always changing depending on the scrolling of that list, which makes it difficult for most tools to find the element and execute the recorded verification against it.
Solution: Telerik automated testing tools offer special support for virtualized controls where the Visual Tree only contains a certain amount of child items at any point in time. Our recorder detects virtualized lists and captures extra data in terms of where the virtualized list item is. Then on playback the execution engine ensures the target list item is in the virtualized list and in the correct order before attempting to execute the action on it.
Virtualized Controls Testing

Telerik
WebUI Test Studio

Powered by Sitefinity ASP.NET CMS

Contact Us | Site Feedback | Terms of Use | Privacy Policy
Copyright © 2002-2010 Telerik. All rights reserved.