The Automation Design Canvas is a great test automation solution. You’ll get convinced after watching the videos on Telerik TV or downloading the WebUI Test Studio and start recording your first tests. And still there’s something great to be found about this tool – its excellent extensibility model.
Building the translators
During the last couple of months our team had the pleasure to work on extending the tool for the purpose of RadControls for ASP.NET AJAX application test automation. We aim to provide the extensions that will enable our customers to create the necessary regression tests as easy as possible. Welcome the RadControls Translators – the brand new addition to the WebUI Test Studio.
Description of the translators
It might be helpful to explain briefly the etymology of the term “translator”. It’s just the base unit that:
- Is responsible for an exact component, i.e. any control type needs a separate translator.
- Provides the useful type of verifications -- those that your tests will consist of.
- Translates/processes the actions over that control – click the button; check the check box, etc. in the appropriate way.
The creation of RadControls translators is definitely a bit more complex task. As our ASP.NET AJAX components expose a lot of functionality, the translators need to cover as many features as possible so that customers can build useful test suites for all their scenarios.
The controls’ complex structure sometimes leads not just to one or two, but to many translators for the same component. My favorite example is the RadGrid control. Its functionality and elements DOM tree require building a dozen of translators starting from the inner one – the Grid data cell (I’m using the underlying element as a name), its parent – the Grid data item/row along with the Grid data table, the Grid columns, pager item, etc. ending with the outer one – the Grid translator itself. They all compose a child-parent hierarchy of translators that you can find visualized via some schemes in the RadControls Translators Reference document. The document contains all the information about:
- The translators’ hierarchy for all the RadControls.
- The exposed verifications for each translator.
- The translated actions specific to each component.
- The respective HtmlControls extending the WebAii controls library. The key units along with the translators can be used to enhance the recorded tests in CS or VB. I’ll focus more on the HTML controls in a separate post.
Using the translators
I’ll skip the very beginning that you probably know from the videos. In short, you need to switch on the recording and the “hover over highlighting” options to enable the complete functionality of the translators.
As mentioned earlier, each translator is responsible for processing the specific control actions. Pointing at a component from the RadControls suite or its sub-element makes the locator’s icon and color pop up so that you can proceed with the recording.
So whenever you sort the RadGrid data, expand the RadTreeView node, open the RadComboBox item list, select the RadCalendar date, etc. the translators generate the necessary test step. You can additionally configure it via the properties (property grid) if needed.
In the above screen capture the dotted locators identify the translator parents as well (data cell -> data item -> data table -> Grid). You can iterate through all those translators by just right-clicking on the same element. The first right-click pops up the context menu of the element’s translator. The menu contains all the useful options you may need – two types of verification, the desktop actions, events that can be invoked, etc. The next right-click will open the context menu of the parent translator if available and so on.
The set of translator verifications from the sub menu we call “quick tasks”. Those are the most common verifications specific to the control in question. Additional ones are accessible via the Sentence Verification Builder implementations. In most cases, choosing some of those dropdown options will give you the chance to generate a couple of similar verifications very quickly:
The full set of verifications is listed in the reference document as well. I encourage you to explore all the options first before start recording your real tests. This knowledge will greatly help you build your tests with minimal efforts.
I think it’s important to underline our priorities concerning the translators’ development in the nearest future.
The Q1 2009 in March will mark the first official version of the entire solution. Each WebUI Test Studio release will operate in full compatibility with the relevant RadControls suite release. Of course, we will do our best to address all your feedback immediately.
Your feedback is very important. If we have missed to handle any specific control action that should be processed by the translators, or if there is a missing verification that you need, do not hesitate to drop us a line.
Our final goal is to help you assure your Web applications (including those based on the RadControls) function flawlessly. I truly believe our efforts inspired a great test automation solution that ensures the so dreamed high quality with minimal resources. I hope you enjoy playing with the WebUI Test Studio as much as the team created the tool for you does.
The Telerik Quality Team
Subscribe to be the first to get our expert-written articles and tutorials for developers!
All fields are required