APPLICATION DELIVERY
HOW TO SIMPLIFY .NET TESTING
EXECUTIVE SUMMARY Mercury QuickTest Professional™ is the industry’s most powerful tool for functional test and regression test automation. Infragistics TestAdvantage™ is a collection of custom libraries that extend Mercury QuickTest Professional to enable automated testing of the presentation layer in Windows Forms applications. The combined solution empowers development teams to test and deploy higher-quality Windows Forms applications faster, cheaper, and with less risk. This paper will briefly review the challenges of testing Windows Forms applications and review the functionality of Mercury QuickTest Professional and its .NET add-in capabilities. The paper will then introduce Infragistics TestAdvantage custom libraries and the Infragistics NetAdvantage presentation layer toolset, and conclude by presenting the benefits of using Mercury QuickTest Professional and TestAdvantage to automatically test the presentation layer of Windows Forms applications.
TABLE OF CONTENTS Executive Summary …………………………………………………………………2
Testing with Mercury QuickTest Professional and TestAdvantage ……………5
Presentation Layer Testing Challenges ……………………………………………3
Advanced DLL-Based Customization of TestAdvantage Libraries ………6
Current Testing Alternatives ……………………………………………………3
Benefits of Using Mercury QuickTest Professional with TestAdvantage ……6
Functional and Regression Testing with Mercury QuickTest Professional……3
About Mercury ………………………………………………………………………6
TestAdvantage Custom Libraries for Testing .NET Controls ……………………4
About Infragistics ……………………………………………………………………7
The Infragistics NetAdvantage Toolset ………………………………………4
APPLICATION DELIVERY
Presentation Layer Testing Challenges While automated testing tools have been available for many aspects and stages of application development, developers working with the presentation layer of applications have not had access to the caliber of tools necessary for ensuring peak performance of the user interface. Application developers and QA teams need to test the quality and predictability of outcome across the entire application development lifecycle (ADL), including the presentation layer. Today’s application presentation layers are being built using a wide variety of reusable development tools that provide the essential functionality to drive the application. Testing these user interfaces with traditional tools can be quite difficult, due to the limited knowledge of the specific development tool’s object model by the automated testing tools. As a result, many developers have been faced with the choice of undertaking a time-consuming process of writing custom code to test their applications – or not testing the presentation layer at all. The presentation layer is one of the most important parts of an application, due to the fact that it presents innumerable scenarios of how an end user might interact with the application. If an application is launched without any regression testing or even basic user interface testing, it introduces a significant risk that the application might perform poorly or even fail in production. Current Testing Alternatives
Application developers and QA teams can choose between developing manual or adopting automated testing solutions. Manual testing solutions provide the benefit of requiring no upfront investments for testing software, but these processes are quite prone to human error and very costly and slow to implement. Automated testing solutions are not prone to human error, can be run unattended (e.g., overnight), and can dramatically lower personnel costs, in that a single person can run multiple simultaneous tests. The initial investment in testing software is quickly and easily offset by the many significant benefits of automated testing, including the reduction in testing expenses and the elimination of the potentially devastating effects of releasing sub-standard software.
Functional and Regression Testing with Mercury QuickTest Professional Mercury QuickTest Professional provides a leading solution for functional test and regression test automation – addressing every major software application and environment. It satisfies the needs of both technical and non-technical users. It enables the deployment higher-quality applications faster, cheaper, and with less risk. Mercury QuickTest Professional works hand-in-hand with Mercury Business Process Testing™ to bring non-technical subject matter experts into the quality process in a meaningful way. Mercury Business Process Testing empowers the entire testing team to create sophisticated test suites earlier in the QA process with minimal training.
WWW.MERCURY.COM
3
APPLICATION DELIVERY
In addition to its core functionality, the Mercury QuickTest Professional .NET add-in capability enables developers to provide high-level support for third-party and custom .NET controls, including Windows Forms elements. This add-in extensibility was the framework used for developing the Infragistics TestAdvantage custom libraries.
TestAdvantage Custom Libraries for Testing .NET Controls In order to address the many challenges of testing enterprise applications, Infragistics and Mercury have developed the first out-of-the-box tool for automated testing of the presentation layer. Infragistics TestAdvantage provides a complete set of custom libraries that accelerate the testing of Windows Forms applications with Mercury QuickTest Professional. This combined solution enables developers to extend the testing model to thoroughly test the presentation layer in Windows Forms applications. Infragistics had already chosen Mercury QuickTest Professional for internal use with its functional and regression testing process. So the decision to partner with Mercury to develop the custom libraries for testing NetAdvantage implementations was a logical move. By using TestAdvantage’s custom libraries, Mercury QuickTest Professional quickly records and replays script commands for testing the presentation layer, instead of using generic mouse coordinates. Its fast playback capabilities enable more test scripts to run in a given amount of time, providing better test coverage and ultimately producing higher quality software. The Infragistics NetAdvantage Toolset
Infragistics NetAdvantage is the most comprehensive presentation layer toolset for developing commercial-class user interfaces for Windows Forms, ASP.NET, Tablet PC, and COM applications. NetAdvantage contains all major interface elements, including grids, scheduling, charting, toolbars, menus, listbars, trees, tabs, explorer bars, UI, editors, and more. Mercury QuickTest Professional and the Infragistics TestAdvantage custom libraries now provide the ability to test all Windows Forms applications built with Infragistics NetAdvantage.
Windows Forms applications developed using Infragistics NetAdvantage Presentation Layer toolset.
WWW.MERCURY.COM
4
APPLICATION DELIVERY
Testing with Mercury QuickTest Professional and TestAdvantage Before the availability of the TestAdvantage custom libraries, application developers and QA testers could only see third-party presentation layer components as single objects and could not test individual functions of any component (e.g., expanding rows in a hierarchical grid.) This was insufficient for testing complex Windows Forms elements. Presentation layer testers needed the ability to drill down into these intricate elements to identify bottlenecks and troubleshoot any performance or usability issues. Now, by using Mercury QuickTest Professional with the TestAdvantage custom libraries, developers and QA teams have the ability to see into all of the Windows Forms elements developed using the Infragistics NetAdvantage toolset. The combined Mercury and Infragistics solution is extremely easy to learn and intuitive to use. Mercury QuickTest Professional with TestAdvantage simplifies the testing process by quickly recording and replaying script commands for Windows Forms applications. Other
A Mercury QuickTest Professional test recorded against TestAdvantage.
testing tools require that programmers use generic mouse coordinates to test their user interfaces, leading to error-prone and time-consuming testing processes. Before automated testing commences, the application is placed in “Record” mode through Mercury QuickTest Professional. The tester then manually runs through the application test just one time. During this manual run, the test script is automatically recorded as the user moves through all of the functions that need to be tested. The application is then placed in “Run” mode. The test is then automatically rerun according to the pre-recorded test script, and the results of each action are documented in detailed reports.
NETADVANTAGE
MERCURY QUICKTEST PROFESSIONAL AND INFRAGISTICS TESTADVANTAGE
Application and advanced presentation layer developed
Application is run once in “Record” mode
Script is automatically recorded
Application is placed in “Run” mode
Test is re-run automatically
The testing process using Mercury QuickTest Professional with Infragistics TestAdvantage custom libraries.
WWW.MERCURY.COM
5
Reports are generated
APPLICATION DELIVERY
Mercury QuickTest Professional and the TestAdvantage custom libraries provide very fast playback capabilities, enabling application developers and QA teams to test more of their applications, test more thoroughly, and ultimately produce higher quality software. Advanced DLL-Based Customization of TestAdvantage Libraries
TestAdvantage provides unlimited access to all custom libraries by providing the source code. By including the source code, companies who inherit and extend Infragistics NetAdvantage elements gain the ability to automate testing to cover any changes their development teams may have made to their code base. Test teams with basic C# programming skills can easily extend existing libraries to meet their needs or create additional libraries if necessary.
Benefits of Using Mercury QuickTest Professional with TestAdvantage Mercury QuickTest Professional and TestAdvantage extend best practices in the application development lifecycle all the way to the presentation layer. By using TestAdvantage custom libraries, development and QA teams are now able to: • Thoroughly test the application’s presentation layer prior to release and after any modifications. • Provide an accelerated time to market for new Windows Forms applications. • Produce more accurate test results, since automated testing of the presentation layer is not prone to human-error-like manual processes. • Dramatically lower personnel costs by providing the ability to run tests unattended. • Enable more test scripts to run in a given amount of time, providing better test coverage. All of these advantages enable enterprises to ultimately produce complex Windows Forms applications faster and with higher quality, eliminating the potentially devastating effects of releasing low-quality software.
About Mercury Mercury, the global leader in business technology optimization (BTO), is committed to helping customers optimize the business value of information technology. Founded in 1989, Mercury conducts business worldwide and is one of the fastest-growing enterprise software companies today. Mercury provides software and services to govern the priorities, processes, and people of IT; deliver and manage applications; and integrate IT strategy and execution. Customers worldwide rely on Mercury offerings to improve quality and performance of applications and manage IT costs, risks, and compliance. Mercury BTO offerings are complemented by technologies and services from global business partners. For more information on Mercury products and services, please visit www.mercury.com.
WWW.MERCURY.COM
6
APPLICATION DELIVERY
About Infragistics
TESTADVANTAGE WINDOWS FORMS ELEMENTS
Infragistics is the market leader in providing a broad range of presentation layer development tools and services for building applications utilizing Microsoft .NET, COM, and Java environments. Over the past 16 years, Infragistics has received over 220 product awards and industry vendor of the year awards from market-leading publications and resellers. Infragistics’ diverse product line for
Infragistics Windows Forms elements* that have corresponding TestAdvantage Custom Libraries include: • WinScrollBar • WinChart • WinEditors: WinCalculator,
Windows Forms, ASP.NET, Tablet PC, COM, and Java environments
WinCalculatorDropdown, WinCheckEditor,
are used worldwide in nearly every Fortune 2000 Company. For
WinColorPicker, WinComboEditor,
more information on Infragistics development tools, please visit
WinCurrencyEditor, WinDateTimeEditor, WinFontNameEditor, WinMaskedEdit,
www.infragistics.com or call 1-800-231-8588.
WinNumericEditor, WinOptionSet, WinText Editor, WinTimeZoneEditor • WinExplorerBar • WinGrid: WinCombo, WinDropdown, WinGrid • WinListBar • WinMisc: WinButton, WinDropDownButton • WinSchedule: WinCalendarCombo, WinDayView, WinMonthViewMulti, WinMonthViewSingle, WinWeekView • WinToolbars: WinDock, WinStatusBar, WinTabbedMdiManager, WinTabControl, WinTabStripControl, WinToolbarsManager • WinTree *Other Infragistics Windows Forms elements do not have libraries since they are either nonvisual elements or require no user interaction.
WWW.MERCURY.COM
7
Mercury is the global leader in business technology optimization (BTO). We are committed to helping customers optimize the business value of IT. WWW.MERCURY.COM © 2005 Mercury Interactive Corporation. Patents pending. All rights reserved. Mercury Interactive, the Mercury logo, Mercury Business Process Testing, and Mercury QuickTest Professional are trademarks or registered trademarks of Mercury Interactive Corporation in the United States and/or other foreign countries. All other company, brand, and product names are marks of their respective holders. WP-1339-0405