Click here to Skip to main content
15,867,895 members
Articles / Web Development / HTML
Article

Beyond the Boundaries of Visual Studio 2010 Test Professional with Telerik WebUI Test Studio

12 Jul 2010CPOL10 min read 31.8K   7   1
This article is designed to help clarify the way Telerik WebUI Test Studio goes beyond Visual Studio 2010 Test Edition to offer richer user experience and solid web testing solutions.

This article is in the Product Showcase section for our sponsors at CodeProject. These articles are intended to provide you with information on products and services that we consider useful and of value to developers.

Image 1

This piece is designed to help clarify the way Telerik automated testing tools go beyond Visual Studio 2010 Test Edition to offer richer user experience and solid web testing solutions. Its purpose is also to help readers understand the key challenges with test automation that we are trying to solve with our solution beyond just the “Hello World” test case.

With the release of Visual Studio 2010, Microsoft has introduced the capability to automate the user interface (UI) of applications on the Windows platform. The VS2010 Ultimate Edition introduces the CodedUI test framework and the MTM (Microsoft Test Manager) as solutions for Testers and QAs to help manage test creation and test automation. We believe this to be a great step forward and a win for our customers especially in the areas of Test and Lab management. The Visual Studio / .NET platform has traditionally been exclusive to developers but now with VS2010 it also encompasses testers and QA professionals.

Test automation is not only about recording button clicks but also managing the test after recording. It is not only about how fast you can record a test but also how fast you can resolve a failure. It is not only about how many different technologies it supports but also how well it supports the technology you care about. All of these are critical when it comes to test automation and are important when evaluating any test automation solution.

The Specialized vs. “One-Size-Fits-All” Solution: How Does WebUI Test Studio Cater to Your Web Testing Needs?

Visual Studio 2010 approach to test automation is to offer a broad, “One-Size-Fits-All” solution. They try to solve all automation challenges for all technologies using one common approach which results in generalizing the specific automation needs and challenges that each technology introduces.

For example, automating web/AJAX applications has distinct and different challenges and needs than those for Windows Forms or WPF applications. When working with a web application you are typically dealing with HTML and JavaScript. You are verifying a simple tag and complex multi-level tags with textual content. With WPF or Silverlight you are working with Visual Trees with complex properties and dealing with rich transforms and complex animations. The idea that you can fully meet the need of both using one homogeneous solution and UI is ideal but not practical.

With WebUI Test Studio we are trying to address the specific automation needs of web applications. We studied the work-flow of testers when automating for the web and the entire testing life-cycle which helped us identify areas that take the longest to automate or are very tedious. We have built many specialized features that cater to these needs that you will not find in VS 2010, here are a few worth noting:

  • DOM Explorer: A full DOM explorer for your web application that supports nested frames and allows you to do rich search across the entire DOM. You can also navigate directly to specific nested Frame or iFrame with one right click and directly craft verification from it. This feature reduces your reliance on external tools and reduces the context switching between our tool and others.

    DOM_Explorer_small.png

  • Web Verifications: Build computed or in-line style verifications directly from the UI in addition to the attribute/content and CSS visibility verifications. Such scenarios are important when validating web element positioning and layering.
  • DOM Captures on Failure: When your test fails, we capture the DOM of the page at the state of failure and display it for you to help you resolve your failure easier.
  • Execution Intelligence: The execution engine is built to handle AJAX solutions from the ground-up. If you are executing a web test, the engine will intrinsically ensure the element exists and is visible on the page before running each step. The check for visibility uses the actual HTML/CSS visibility checks rather than UIAutomation which is much more reliable. For Silverlight scenarios we also ensure the element is not moving by doing a motion check on the actual visual element. This feature enhances the reliability of your execution dramatically so that you don’t need to clutter your tests with sleeps and waits.

    Find_Expression_small.png

  • Find Expressions & Live Validation: As many experienced testers will tell you, tests frequently fail due to element changes in the web application as it evolves. The Find Expression is a UI editor that allows you to easily resolve element find failures with a suggest feature to help you understand why the find failed. It also comes with an integrated DOM so you can validate right there and then that you are finding the correct element instead of having to execute the test with each edit. A great time saver. Live_Validation_small.png

Coded vs. Code-less (script-less) Automation

Do I always have to write code to automate my test? What if my tester is not proficient in C# or VB.NET? Am I stuck with manual testing?

We don’t believe you always need to write code to build test automation. In Visual Studio 2010, to properly perform test automation of real line-of-business applications you always have to revert to the CodedUI test which is a pure C# or VB.NET class that leverages the CodedUI framework for automation. The element mapping in Visual Studio 2010 - also known as the UIMap - generates a complex hierarchy of classes to represent the elements as strongly-typed objects in code. Not very convenient when it comes to test maintenance. For example, a simple 15 step test in VS2010 generated around 1000 lines of code for the test method.

Yes, there will always be cases when you will need to revert to code but that doesn’t mean your entire test has to be in code.

In WebUI Test Studio we designed our solution to allow most QA/Test professionals to automate without having to revert to code in most of the scenarios. When complex logic is needed, a step or two out of your entire test can be converted and written in C# or VB.NET code without having to convert the entire test. Such approach not only simplifies test automation for non-developer QA professionals but also makes test maintenance a lot easier. You can update your test by changing properties rather than editing code and doing code refactoring. Many of our customers that use WebUI Test Studio end up writing 90-95% of their test automation without having to code anything.

UIAutomation vs. Full Application Access

UIAutomation technology is the evolution of the Accessibility API which is the mechanism by which screen readers and other aided technologies enable visually impaired users to interact with a computer. Since 2005 Microsoft has been pushing UIAutomation as a solution not only for accessibility tools but also for test automation. In a way, they were trying to hit two birds with one stone.

UIAutomation depends on application level hooks that give access to external programs to invoke or retrieve information from the application. UIAutomation is 100% dependent on the developer of the application giving access to these parts of the application; else those parts can’t be automated. With UIAutomation we found ourselves constantly hitting the wall of “not exposed by developer” argument and we ended up having to run tests manually because developers didn’t have enough cycles to expose needed functionality.

Furthermore, UIAutomation does not offer real-user simulation. When calling a UIAutomation API you are actually invoking a method call within your application. The user experience could actually be a lot different for many applications.

When building WebUI Test Studio we wanted to build a solution for testers that gives them freedom and full access to the application under test without limitations. Therefore we completely avoided any heavy reliance on UIAutomation and used it only in certain scenarios. Our architecture relies on having full access to the application whether it is a Silverlight application or an Html page. You can access any and every element in the application and perform real-user actions against it.

VS 2010 solution is almost completely architected and reliant on UIAutomation. It is the solution by which all desktop technologies are being automated including any future Silverlight application support that they might include.

Cross-Browser Support

Cross-browser-small.png

With the release of VS2010, the matrix support for browsers include IE & Firefox. WebUI Test Studio currently supports IE/Firefox & Safari and Chrome support will be available before the end of 2010.

Silverlight Automation

VS2010 does not support Silverlight. WebUI Test Studio has full Silverlight record/playback compatibility with rich specialized features for Silverlight applications automation:

  • Visual Tree inspection: View the entire visual tree of your Silverlight application and target specific elements for verifications.
  • Rich support for Out-Of-Box controls: All the Silverlight out-of-box controls that ship with Silverlight are supported with specialized translators for each control. For example, when using the Silverlight Calendar control and selecting date, our translators understand the control being used and can determine the action you are performing. So instead of recording a click against a low-level element, it records a select for a specific date. This makes the test easy to understand, and easy to update.

    SL_controls_small.png

  • Custom Controls Support: From experience with real-business applications that customers are trying to automate, we found that many applications use custom controls built in-house by the development team. Some inherit from Panels/Calendars/Checkboxes…etc. Our tool provides a smart control matching feature that allows the it to drop to the base control type and offer the common tasks for that control instead of dropping to just a raw base element with only generic tasks associated with it.

Native Support for Telerik controls for ASP.NET AJAX & Silverlight

If you use RadControls (ASP.NET AJAX or Silverlight) in the application you are trying to automate, then you won’t find a more suited test automation tool for your application than WebUI Test Studio.

WebUI Test Studio comes with rich support for each RadControl:

    RadControls_Recognition.png
  1. RadControls are automatically detected on your page visually.

    RadControls_Test_Steps.png

  2. When performing an action within the control, the action is routed through a special translator built for each control to help identify the action at higher contextual level than a raw click, for example: TreeView=>Expand, Calendar=>SelectDate,DropDown=>Select Item RAdControls_verifications.png
  3. Each control has a set of specialized verification and synchronization tasks that are built dynamically for your application in the desired state you want verified:

With WebUI Test Studio you will have the ability to:

  1. Spend more time building test scenarios to ensure the quality of your application rather than trying to figure out how to automate an action on the control and understanding the complexity of its rendering.
  2. You don’t need to worry about backward compatibility. With each RadControls release, the translators are updated so your test continues to work without having to touch any of your tests.

Customer Support & Release Agility

At Telerik we have world-class support that starts the day you download your trial. Each trial user gets the ability to not only use the community forums to ask questions but also gets to submit support tickets that our support professionals answer within 24- 48hours.

Each license comes with 1 year of support. Each ticket submitted is also handled within 24hours. If you are still having problems, we schedule GotoMeetings to help guide you through you automation scenario and offer hands-on tips and workarounds if needed.

With three releases a year and weekly public internal build releases, your feature requests and bug fixes are accessible with a faster turnaround not unmatched by any other product.

Visual Studio’s release cycle are typically 1-2 years out and getting a feature request approved and implemented takes months if not years.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Unknown
Telerik is a leading
vendor of development tools and components for Microsoft .NET.
Developers from most of the Fortune 2000 companies, many of the world’s
leading educational and non-profit organizations and thousands of
consultants rely on Telerik products to build applications with
unparalleled richness, responsiveness and interactivity.
This is a Organisation

1 members

Comments and Discussions

 
QuestionIt does not cover how MTM function? Pin
microtan15-Nov-11 7:59
microtan15-Nov-11 7:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.