Silverlight testing with Test Studio
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 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.
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 available Silverlight UI testing solutions
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.
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
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.
See how we solve this problem Back to top
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
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.
See how we solve this problem Back to top
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 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, Test Studio will instantly detect them and suggest specific verifications even for complex data and navigation components.
See how we solve this problem Back to top
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
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.
See how we solve this problem Back to top
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
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.
See how we solve this problem Back to top
Virtualized Controls
Problem
Data Virtualization allows you to benefit from only having the UI Elements which are visible on screen generated/taking up memory. These methods however bring reliability issues for your 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 to 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.
See how we solve this problem Back to top