Você está na página 1de 9

An ISO 9001:2000 Company

Enhanced Functional Test Automation


With
Rational Robot

India

AppPoint Software Solutions,


#28, BHCS Layout,
Bannerghatta Road,
Bangalore – 560076
Phone – 011 – 91-80-41103673,5
Fax - 011 – 91-80-41103674

USA
AppPoint Software Solutions,
59, Grist Mill Road,
Littleton, MA 01460.

Phone –001-978 387 4239

www.apppoint.com
An ISO 9001:2000 Company

TABLE OF CONTENTS

Introduction .................................................................................. 3
Win32 Controls – ........................................................................... 5
Proxies for a Win32 Control .......................................................... 5
ActiveX controls............................................................................. 6
Proxies for an ActiveX Control....................................................... 6
ActiveX control hosted in an MFC application................................ 6
ActiveX control hosted in an ATL application ................................ 6
Java and .NET Controls................................................................... 7
Conclusion .................................................................................... 7
About AppPoint.............................................................................. 8
An ISO 9001:2000 Company

Introduction
Research indicates that cost of a software defect would be much higher then
what it would if the defect was found much earlier in development process. In
order to keep this cost low, companies have been adopting tools which ensure
reliable quality assurance at all stages of their product development lifecycle.

Rational Robot is an industry leading functional test solution from IBM,


Rational Software.

Performing functional test involves following typical stages,

• Studying the requirement document for the solution being tested,


• Identifying and Documenting all the use cases to be tested,
• Defining Data input and expected results for each of the use cases,
• Creating a reliable mechanism to consistently simulate identified test
cases with appropriate data,
• Automating these simulations to minimize user intervention and thereby
errors,
• Defining a verification mechanism for expected behavior, and
• Analyzing the results from above automated simulations.

Rational Robot allows users to:

1. Interactively record user interaction for predefined use cases,


2. Allow users to simulate the use case with appropriate data,
3. Allows user to perform verification on the data being worked on by the
application and properties of individual elements making up the
application under test,
4. Record the results of the simulation runs for later analysis.
5. Automate execution of simulations to run in a non-interactive way.

Robot is capable of testing functionality of applications developed using, C++,


VB, .NET, JAVA, Delphi, Oracle, PowerBuilder, or HTML platforms. In addition it
enables testing packaged applications like SAP and PeopleSoft.

Recognizing and negotiating with components used by the solution under test
forms the basis for test functionality. In cases where these components are
GUI elements, uniquely recognizing these and negotiating with them is critical
for reliable testing.

Rational Robot is capable of negotiating with most of the GUI components


used with above listed platforms. But, it is quite common for the end user to
use custom GUI components to enhance the usability of the solution. These
components can either be developed in-house, or purchased from a vendor
who specializes in developing custom controls.

Being custom implementations, these controls expose a limitation in Robot


with its ability to negotiate with them. In order to solve this problem, IBM,
An ISO 9001:2000 Company

Rational Software has designed an extensibility mechanism by which users can


develop a bridge between Robot and the custom controls.

This document is a result of an independent study done by AppPoint’s technical


team on this bridging mechanism. The intended audiences for this document
are individuals who are exploring feasibility of using Robot Extensibility
Mechanism to enhance testability of their application.

There are 4 different category of custom controls for which an extensibility


mechanism exists in Robot, they are

• Win32
• ActiveX
• .NET, and
• Java controls

Robot Proxies for each of these control categories are components which are
capable of negotiating with the control and registered with Robot to act as a
bridge between it and the control. In general, Robot proxies negotiate with the
control to obtain following primary information,

• Unique Name of any object at a given point within the control, and
• Bounds of the object,

Figure 1: Rational Robot Proxy Architecture

Depending upon the type of the proxy, proxies would use varying mechanism
to negotiate with the controls. Below section briefly summaries the proxy
mechanism for each of the above types of controls and their limitations.
An ISO 9001:2000 Company

Win32 Controls –
These are packaged HWND based controls which are distributed in the form of
control libraries. These controls could either be simple controls or nested
controls. There are 2 flavors of these controls:
1. MFC based controls
a. Stingray Grid Control
b. Dundas Grid controls, etc
2. Non-MFC based custom controls
a. VB User Control

These controls can be embedded in any environment, for e.g in a


C++ application, VB Application, or Delphi application.

Proxies for a Win32 Control

In order to enhance Robots ability to negotiate with a win32 control one would
have to develop a Win32 Proxy for the control. A Win32 proxy is a COM
component which implements Microsoft’s Active Accessibility Interface (MSAA)
in addition to certain custom interface published by IBM, Rational Software.
Implementing a Win32 proxy requires access to the header files and library for
the control. Optionally having access to source code of the control would speed
up the process of implementing the proxy and also ensures better design and
testability of the proxy.

As in case of all proxy mechanism, a win32 proxy would negotiate


with the real control to provide information required by Robot.
Win32 proxy has two ways of negotiating with the control,
1. Using custom Windows Messaging to exchange information between the
proxy and the control, or
2. By way of call to API(s) exposed by the control.

With option #1, the control and the proxy have to agree upon certain
messaging mechanism. This option is suitable for a control whose source code
is available and where the end user is OK with modifying the control source to
add additional message handlers. AppPoint would work closely with the end
user in implementing this mechanism.

Option #2 requires that the proxy gain access to an internal representation of


the control as seen by the application under test.
Depending upon the type of Win32 control the proxy can either automatically
locate the internal representation or it would have to be explicitly exposed to
the proxy.

In case of an MFC control, most often, the proxy can use


CWnd::FromHandlePermanent to get access to the internal representation of
the control.
An ISO 9001:2000 Company

Note:

In some cases, MFC architecture makes it impossible for the proxy to get
access to the controls internal representation (as CWnd derived object) using
CWnd::FromHandlePermanent API. In these cases, proxy mechanism requires
that the internal representation (instance of the control) be exposed to the
proxy by way of a property of the HWND object. This is done by making a call
to ::SetProp API against the HWND object by the application designer. The
property name is something which the proxy and the control would agree
upon.

ActiveX controls

ActiveX controls are packaged components which implement specialized


functionality. ActiveX components can be used in any environment which is
COM enabled and has support for hosting these. Typical hosting environment
are, Visual Basic, MFC/ATL application framework, Browsers, etc.

Proxies for an ActiveX Control

Rational Robot supports testing ActiveX control embedded in any environment


which is capable of hosting them. Robot proxy for an ActiveX control is
implemented as a COM object which implements MSAA and a custom interface
published by IBM, Rational Software.
Implementing an ActiveX proxy requires access to the ActiveX control binaries
and any documentation available describing the exposed functionality.
Depending upon the hosting environment Robot Extensibility mechanism
(Proxy Mechanism) for ActiveX controls has certain limitations. Based on the
experience AppPoint has gained with developing proxies for ActiveX controls
below is a summary of certain known limitations.

ActiveX control hosted in an MFC application

If the application hosting the ActiveX control is an SDK/MFC application, then


Rational Robot requires that the customer embed its “SQAOTestControl” inside
the container (Dialog box, Views, etc) which is hosting the ActiveX control to
be able to recognize it.

ActiveX control hosted in an ATL application

Due to the fact that ATL framework wraps each of the ActiveX control by an
ATLHost component, “SQAOTestControl” needs to be dynamically embedded
inside these host.
An ISO 9001:2000 Company

Java and .NET Controls


Robot proxies for JAVA and .NET control implement custom interfaces defined
by IBM, Rational Software through which they expose information about the
component being bridged.
There are no known limitations with JAVA and .NET proxies. Implementing
these proxies requires access to control binaries as well as any documentation
available.

Conclusion
Based on AppPoint’s expertise with developing proxies below table provides a
birds eye view of can and can’t dos of Robot’s proxy mechanism.

Feature Support Win32 ActiveX .NET JAVA


Object Recognition √ √ √ √
ODVP √ √ √ √
*Customizable √ X √ X
ODVP
OPVP √ X √ √

• ODVP can be customized to return different data, for e.g. in case of a


grid it could be VP on “Selected Rows”, “Selected Columns”, “All Data”


Limitations Win32 ActiveX .NET JAVA
Modification to AUT by way of SetProp √**
call.
Use of Rational Test Control √***

** Changes to AUT in case of Win32 proxy is due to,

1. Limitations imposed by MFC framework, or


2. Specific to the way AUT is designed where the proxy can’t get access to
internal representation of the control.

*** Rational test control needs to be embedded in a container hosting the


ActiveX control for all environments except VB.

Other known limitations with Robot proxy mechanism are:

Robot does not use the proxy to get object information during drag/drop
operation. With Win32 proxy mechanism, object property values are limited to
data types supported by a VARIANT. All other properties like, color, font, etc
are recognized in their string format.

With ActiveX proxies, if the number of nested objects are large (for e.g. in a
Grid, ever cell is treated as a nested
An ISO 9001:2000 Company

About AppPoint
AppPoint Software Solutions is a member of prestigious IBM Partner world for
Developers specializing in software development tools and technology.
AppPoint has extensive expertise with developing proxies for all the platforms
supported by Robot. AppPoint has so far developed following proxies for clients
around the world,

ActiveX Proxies –

• ComponentOne
o FlexGrid Control

• VB User Control

Win32 Proxies –

• Stingray
o Grid Control
o Tree Control
• Dundas Software
o Ultra Grid Control
.NET Proxies –

• ComponentOne
o FlexGrid Control
• DevComponents
o DotNetBar
o Outlook SideBar
• Infragistics
o UltraWinTree
o Grid Control
o Status Bar
o ComboBox

In addition to specializing in enhancing the testability of applications, AppPoint


also has developed a solution, TMPublisher to automatically publish your test
results on to your intranet/internet for a wider audience. With this solution,
teams distributed globally can ensure visibility to test results on a real time
basis. Contact us at sales@apppoint.com to request for an evaluation copy of
TMPublisher. AppPoint has developed a value add solution for IBM, Rational
ClearQuest, ActiveCQ which would enhance your ClearQuest deployment for
performance and functionality. ActiveCQ enables asynchronous automation of
notification, exception handling with in your development process, automated
reporting and integration with external processes.

AppPoint has vast experience is automating various processes in a software


development lifecycle. AppPoint has developed a business process automation
solution knows as ADS (AppPoint Development Services) which comprises of a
set of tools and services which would enable us to automate your existing
An ISO 9001:2000 Company

business processes and increase ROI on your investment. We would be glad to


conduct a feasibility analysis for your organization and propose a solution
suitable for your business need.

We have thorough knowledge of enterprise application like, Siebel, Vantive,


Oracle and have successfully integrated these solutions with other tools used
in a software development lifecycle.

Você também pode gostar