Documente Academic
Documente Profesional
Documente Cultură
Bonn 폷 Boston
Contents at a Glance
1 Introduction ............................................................ 21
PART I Methodology
Preface ......................................................................................... 13
Foreword ...................................................................................... 15
1 Introduction ............................................................. 21
PART I Methodology
7
Contents
8
Contents
9
Contents
10
Contents
11
Preface
SAP AG has served its customers as a strategic partner for many years
now. It does so based on its role as a provider of software applica-
tions that support process and business modelling innovations, flex-
ibility, and fast adaptability. We have made it a standard of ours to
support our customers in a holistic way, as a “trusted advisor”,
throughout the whole software lifecycle.
13
Preface
SAP is thus ideally positioned to fulfill our own vision of being the
“trusted advisor” for our customers. In this context, I would like to
extend my sincere thanks to the authors for their commitment to
provide our customers and partners with the benefit of their com-
bined experience in the form of this book. As for you, dear readers,
I hope that this book gives you much in the way of useful informa-
tion about our tools and practical tips for your own activities, and
that you can then put these tips and information to good use in your
own work.
Best regards
Gerhard Oswald
Member of the Executive Board of SAP AG
14
Foreword
It all started some years ago as we drove back from a customer meet-
ing, chatting about how to optimize our presentation material. In
particular, we spent a long time discussing the challenges that our
customers face in the area of testing. We wanted to illustrate these
challenges in a presentation slide in order to represent our proposed
solutions in a way that would “speak to” the customer. Our sponta-
neous brainstorming session brought up several challenges that we
categorized as follows:
15
Foreword
User Modifications
Issue Management Rel. 4.6C
IS ... SiteScope
Java End-To-End
QA Run Regression Tests
System Tests QA Load
TestPartner
CRM SAP Test Workbench Rel. 4.0
eCATT SAP NetWeaver
Test Management
Web AS 6.nn Mobile Sales
APO
Topaz SAP xApps
Test Organizer
QuickTest Pro
CATT
HTML SAPGUI 6.nn EBP
Rel. 4.7
Load and Stress Tests TestDirector
WinGui
Unicode SCM LoadRunner
Integration Tests
WinRunner
Vantage
Track Record QA Director SAP Solution Manager
WebDynpro Functional Tests
BIW 2.x R/3 Enterprise
BIW 3.x
Findings from As you read this book, you will see that not only we have continued
approx. 380 cus- thinking about our customers since our fateful trip, but that the wide
tomer projects
range of experience we’ve gained in our real-world consulting work
has made it possible for us to undertake the writing of this book.
Much of our experience comes from customer projects; we were in
the fortunate position of having access to findings from approxi-
mately 380 customer engagements and projects, plus numerous
other events and presentations on the subject of testing and quality
assurance in and with the SAP customer base. Many of our observa-
tions and arguments arose from or were affirmed in discussions and
collaborations with our customers.
We also realized that there still remains a significant need for infor-
mation and reliable consulting in this area. Again and again, we
encountered situations in which customers received poor consulting
arising from lack of experience on the part of the consulting partner.
In the eCATT area, in particular, we come across this situation several
times a year; for example, the wrong drivers were recommended for
16
Foreword
We do not have exact figures for the usage levels of SAP test tools
amongst the SAP customer base; we can say only that based on the
available evidence, the estimated level of unreported usage is
undoubtedly much higher than may at first appear. Based on our
monitoring of our customer base, we have seen that the level of
traceable usage increases with the usage level of the SAP Solution
Manager. In particular, companies that are looking for a suitable ini-
tial use case of the SAP Solution Manager will quickly find what they
are looking for in the area of testing, and be able to immediately real-
ize the benefit potential by finally dispensing with spreadsheet-based
solutions.
The SAP Solution Manager enables us to document projects and tests Central test
in a thoroughly reproducible manner in a central system. This repre- documentation
sents a real step forward from earlier versions of the classic Test
Workbench from SAP R/3 system releases, although the basic func-
tionality of those systems is still alive and stable. Even the require-
ments of customers that are subject to compliance regulations can
now be easily fulfilled. However, our customers still have a great
need for information about the SAP Solution Manager, which is why
in creating this book, we have paid much attention to the topic of
integrating the SAP test tools into the SAP Solution Manager.
Also, you may place your trust in the reputation of SAP Test Manage-
ment Consulting as a trusted advisor in the testing environment. This
reputation has been built on the basis of countless customer contacts,
engagements, and projects. This book gives the reader access to the
technical basics, our best practices, procedures, and arguments from
the world of testing at SAP.
17
Foreword
Acknowledgements
The completion of a work of this scope and length is no way thanks
only to the authors. We would therefore like to thank everyone who
encouraged and supported us in writing this book.
Without doubt, the first people who deserve thanks are our spouses
and children. During the writing process, not only did they have to
do without us on occasion, they also good-naturedly tolerated our
mental absence even when we were physically present!
Even with all the commitment and dedication in the world, the
implementation of this kind of project requires certain financial con-
ditions. These conditions were fulfilled entirely spontaneously and
adequately by the Executive Board of SAP, as represented by
Gerhard Oswald, and we are very grateful for this.
18
Foreword
book. Thanks are also due to those customers with whom we gained
our experience in this field over the years. Their feedback confirmed
our approach and without it, we could not have written this book.
Our editor Tim Dahmen also played a central role in bringing our
work to fruition. Over the course of numerous conversations, he
took our knowledge and experiences and put them together with his
research to create impressive results. A big thank-you, Tim, and we
wish you all the best in your role as Consultant!
Our editor and interface with the publishing house was Florian
Zimniak, who always tries to create maximum value for the readers
from our manuscripts. Working with him was always a pleasant and
successful experience. Many thanks to Florian Zimniak. Special
thanks to Mirja Werner for her support in the translation process.
There are also several people within SAP AG itself to be thanked for
their support and advice: Jonathan Maidstone (Product Manager SAP
NetWeaver Test Tools), Marc Oliver Schäfer (Product Manager SAP
Solution Manager), Anja Marschollek, Peter Keller, Ralf Debus and
Dennis Landscheidt in the Test Data Migration Server area, Dr. Jörg
Bischof on behalf of the whole eCATT development team, and Dr.
Christian Hansen for his support with creating the Coverage Ana-
lyzer chapter.
19
6 Test Automation with eCATT
Test configuration
BAPIs FUN
Non-SAP system
Test drivers To flexibly interact with the system to be tested, eCATT uses test
drivers. These adapters interlink on different levels with the system
to be tested, and thus enable you to directly check the different
application components.
172
Test Components and Architecture of the Test Landscape 6.1
왘 TCD driver
The TCD driver is appropriate for conventional transactions (with-
out controls). An advantage is that the TCD mode is based on the
batch input technology. Therefore it is possible to process the
recorded transactions in the background (without GUI), which
allows for very efficient tests.
Additionally, the TCD driver enables you to make small adapta-
tions to finalized scrips. This driver is therefore particularly easy
to maintain.
More details about the TCD driver can be found in Section 6.4.
왘 SAPGUI driver
The SAPGUI driver enables you to test transactions that use con-
trols. It is handled differently than the TCD driver because the
recording directly refers to the user interaction with the controls.
The driver exclusively works with and via the SAP GUI for Win-
dows.
More details about the SAPGUI driver can be found in Section 6.5.
왘 Management transactions
Function modules and BAPIs can be called directly from eCATT
without using a management transaction like SE37, for example.
Therefore the transaction sequence in the test process can remain
unchanged as opposed to a manual test performance.
왘 Web Dynpro driver
Web Dynpro applications on the ABAP stack are supported by a
separate driver with the SAP basis release Web AS 6.40. With the
basis release 7.0 of Web AS, these applications are additionally
supported on the Java stack.
More information can be found in Section 6.6.
왘 Web service driver
From Web AS 7.0, web services can be tested in a similar way to
function modules. Only the establishment of a connection
173
6 Test Automation with eCATT
Central test admin- eCATT was designed to be operated via a central test system. SAP
istration system recommends implementing the SAP Solution Manager for both man-
ual and automated tests. This means that eCATT itself is maintained
on the central test administration system and accesses the applica-
tion to be tested via an RFC connection. The application to be tested
can reside on any standalone system of the system landscape. It can
consist of any components, each of which is addressed via an appro-
priate driver. Integration tests, that is, testing several components on
different systems in an integrated way, are supported by eCATT as
well. The requirements for operating eCATT as a central test admin-
istration system are described in Section 6.2.
Test Workbench
All created test objects (i. e. test case descriptions) test scripts as well
as test and system data containers that are placed on the central test
system. The test documentation (i. e. the evidence of test perform-
ances) is managed on the central test system.
System data To execute eCATT scripts on different systems, e. g. when the system
container and landscape has changed, it is necessary to encapsulate the system-spe-
logical targets
cific aspects of the script. This encapsulation ensures that the infor-
mation about the systems to be tested can be exchanged very easily.
Encapsulation eCATT provides a very simple and effective mechanism for this
encapsulation. In a system data container, a number of logical targets
174
Technical Requirements for Implementing eCATT 6.2
within the test landscape are defined. A logical target describes the
role of an application instance in the solution landscape. In the sys-
tem data container, every logical target is assigned exactly one RFC
connection that references the physical system to be tested. In
eCATT scripts, however, only the logical target specifications are
used.
Typically, a test landscape consists of several systems, and the busi- Setting up the
ness process is mapped by a chain of transactions. These belong to trusted RFC
connections
different applications that are distributed to and running on several
systems. A central test management system uses a test script to con-
trol the test of the components on all systems. The test system and
the central test management system communicate via the remote
function call interface (RFC).
175
6 Test Automation with eCATT
Even for an automated test run, a connection via RFC always requires
an interaction with the user because the client, the user name and
the password must be re-entered for every system called via RFC.
Although this problem could be solved by storing the logon data in
the RFC connection, it is not recommended for security reasons.
Support First, all systems to be tested must fulfill specific minimum require-
Package Level ments regarding the installed support package levels of the basis if
their basis release is older than 6.20.
Table 6.1 Minimum Requirements Regarding the Support Package Level According
to Installed Release
More information about required release and support levels can also
be found in SAP Note 519858.
Client maintenance An explicit permission must be set for every client in which an auto-
mated test is to be run via eCATT. The clients are adapted in Transac-
tion SCC4. Call the client maintenance and select the respective cli-
ent. Under CATT and eCATT Restrictions you can select among
several options. The following selection is available:
176
Technical Requirements for Implementing eCATT 6.2
If you want to record transactions with controls using the SAPGUI Enabling SAP GUI
driver, both the central test system and all target systems must have scripting
177
6 Test Automation with eCATT
Enable Scripting
178
Structure of the eCATT Scripts 6.3
Test Script
Attribute
Local Variables
Commands
Parameters are divided into three classes, according to their function Parameters
and visibility. Import parameters are used for importing test data
from variants or other scripts. They are the input interface of the
script and contain the input values at runtime. Results of the script
can be forwarded using export parameters, which are the output
interface. Local variables are parameters, the values of which are
only available within the script. They are used as additional storage
space for interim results. Another usage of local variables is the trans-
fer of values between called scripts.
Every parameter has a unique name that is valid only within the
script. Different scripts can therefore contain parameters of the same
name.
179
6 Test Automation with eCATT
Using this name, the test data is assigned to the parameters. You
should therefore make sure to give parameters in different scripts
the same names if they are used for fields with matching contents. A
parameter used for entering a customer number, for example, could
be named I_CUSTOMER_NO throughout all scripts.
Complex In addition to its name, a parameter has a type reference. Using such
parameters a reference to a structured data type from the ABAP Dictionary, a
structured or tabular parameter is created. Structured parameters
correspond to a row in a table, and they consist of several fields iden-
tified by names, like the columns in a table. Tabular parameters are
made up of a sequence of structured parameters; they are compara-
ble to tables.
Commands The test steps and check logic of eCATT scripts can be supported by
a wide range of commands. Typically, an eCATT script consists of
two blocks. First, a test driver is called. It transfers the control flow
(execution management) to the test object, which is either a transac-
tion, a function module, or a BAPI. The import parameters of the
script are thus passed to the input interface of the test object. This
procedure is called “parameterization.” It is essential for a successful
script because the parameterization links the pure recorder function
of the test drivers to the test data. As soon as the test object has been
executed, the eCATT script can perform calculations and compari-
sons in a second step to compare the result returned by the test
object to an expected value. These comparisons are mainly per-
formed using the messages and values returned by the system. In
individual cases, however, it can be necessary to directly search a
database table for the existence and characteristics of specific values.
180
Testing Transactions without Controls 6.4
Check Results
Write Log
Insert Script
Name
Create Script
eCATT Object
Select Test Script
The central tool for creating eCATT scripts is the script editor. Its Script editor
interface is divided into three areas (see Figure 6.9). The lower area is
181
6 Test Automation with eCATT
occupied by the command editor. There you edit the script logic that
is composed of the different commands.
Command Structure
Editor Editor
The upper area provides an input possibility for creating the param-
eters of a script (see below). If you want to edit a command interface,
the structure editor is additionally opened to the right. It can be
enabled by double-clicking on the name of a command interface in
the command editor.
The first step for creating the script logic is recording a transaction.
Use the recorder function of the script editor for this purpose.
Start recording To start recording, in the script editor select the Pattern button. A
dialog is displayed where you can specify the necessary settings for
the recording (see Figure 6.10). The available commands are sorted
by functions and divided into groups. First select the desired func-
tion group (UI addressing) and then the test driver. In the following
we assume that you use the TCD driver for recording transactions
without controls. As soon as you select the driver you can select the
transaction to be tested. An appropriate interface is then automati-
cally created by the script editor.
Note
In the basis release of Web AS 6.20, the available commands are not yet
grouped into functions. You then select the command directly.
182
Testing Transactions without Controls 6.4
Select Command
TCD command
The TCD command is designed for addressing the TCD driver. It has the
following format:
TCD ( <transaction code>, <command interface>,
[<target system>] ).
A TCD command must always be created via a recording.
When a TCD driver is used, the command interface records all dyn- Command
pros with all fields that have been displayed in the transaction. The interface
data you entered and the default values for fields you did not fill in
are recorded.
The values you entered are displayed as fixed values in the command
interface. You can later use the search function to find these fixed
values during parameterization. No fixed values are recorded for
fields you kept at their predefined default values. During parameter-
ization, you therefore you might have difficulties with identifying
these fields. When recording, ensure that you enter input values for
all fields that are relevant to the test case.
If the test case is to be executed with different values than those used Script parameter-
during the recording, the corresponding fixed values need to be ization
183
6 Test Automation with eCATT
Command
Interface
Transaction
Dynpro
Field (Value=0)
Field (Value=37)
Dynpro
Field
Script Command
Parameter Interface
Transaction
Import Parameter
Dynpro
Import Parameter
Field
Import Parameter
Field
Export Parameter
Dynpro
Variable
Field
Variable
Field
184
Testing Transactions without Controls 6.4
Add
Parameter
Once the names of the parameters have been defined, you specify Parameter types
their visibility. In the parameter editor, specify “I” for import or “E”
for export parameters. If you need local variables you can create
them now as well. Set the type to “V”.
Replace with
Parameter
Set Mode
185
6 Test Automation with eCATT
1. S (set value)
This mode is used for transferring import parameters or local vari-
ables to transaction fields. If you select this mode the parameter
value is transferred to the corresponding dynpro field during
script execution, just like user input.
2. G (get value)
This mode is designed for exporting values from the command
interface. A value calculated by the transaction is transferred to an
export parameter or a local variable after the TCD command has
been executed.
3. C (check value)
The third mode permits a simple verification of the results. The
value returned by the TCD command is compared to the specified
parameter. If the comparison fails, the test case is regarded as
faulty. Note that the possibilities of this test are rather limited. For
more complex conditions, you should use the “G” mode to first
read the field value and then check it later using the CHEVAR com-
mand. For more information, see Section 6.8.
4. I/O (passive)
In this case, the “I” mode refers to an input field that is not
changed by eCATT. Via user parameters, the application can pre-
define the field with values, though.
The “O” refers to an output field that is neither read nor checked
by the eCATT script.
Re-recording The TCD driver enables you to re-record driver calls that have
already been parameterized. This option is used if the test script
encounters an error after the underlying transaction has been
changed, for example, after installing a support package. Such an
error can have two causes. The obvious case is that the change has
caused an error in the application logic. In this case, the error must
be corrected in the application. Although the joy at a successful
test—which is always successful when errors are found—is usually
muted by the implicated difficulties for the operation or the project,
valuable insights can still be gained.
186
Testing Transactions without Controls 6.4
The cause of the second error can be that the structure of the
recorded transaction has been changed and is now incompatible
with the existing test script. Since the structure of a transaction
changes more frequently than its fields (a field can be assigned to a
different dynpro or another group but is hardly ever renamed or
deleted), you can re-record an existing TCD driver call while main-
taining the existing parameterization.
Start Re-Recording
For processing a script, there are various start options available for Start options for
selection. The options relevant to the TCD driver can be found under the TCD driver
187
6 Test Automation with eCATT
Start options are selected before a script is processed. You have the
following options:
188
Testing Transactions with Controls 6.5
Regarding the message handling within the TCD driver, please refer
to Section 6.9.3.
Conclusion
Transactions without controls can be recorded by the TCD driver in
a way comparable to a macro recorder that you might know from
Microsoft Excel. During the parameterization, you replace the fixed
values entered during the recording process with parameters and can
thus create a flexible, usable script. Changing the assignment mode
enables you to read and check the actual values of a parameter.
SAPGUI command
The SAPGUI command is designed for addressing the SAPGUI driver. It
has the following format:
SAPGUI ( <command interface>, [<target system>] ).
In contrast to the TCD command, the SAPGUI command only allows the
transfer of values to the application. There are separate commands for
reading and testing values.
189
6 Test Automation with eCATT
Events While the TCD driver records the result of the input in the record
fields, the SAPGUI driver registers events. These events refer to
changes of the state of screen elements, e. g. the selection of a value
in a listbox, the input of text in a text field or the expansion of a
branch in a tree control. In particular, this means that the SAPGUI
driver only records information about the fields that are actually
changed. Another difference is that the SAPGUI driver uses different
commands for reading and querying screen elements while the TCD
driver serves all actions of the TCD command (see Table 6.2).
Table 6.2 Commands for Parameterizing, Reading and Checking Field Values
190
Testing Transactions with Controls 6.5
3. Per transaction
Events referring to the same transaction are joined, even if they
span several dynpros.
4. Per session
All events between starting and ending an SAP GUI session are
joined to form one command.
5. Manual
The creation of an SAPGUI command is explicitly triggered by the
user, who presses an appropriate button during the recording. If
you use this option, you should add a comment to the creation of
every command to maintain a better overview.
SAPGUI
SAPGUI
SAPGUI
SAPGUI
SAPGUI
SAPGUI
SAPGUI
SAPGUI
SAPGUI
SAPGUI
SAPGUI
SAPGUI
SAPGUI
SAPGUI
SAPGUI
191
6 Test Automation with eCATT
Set Granularity
With the basis release Web AS 6.40, you are able to specify a trans-
action to be started. In this case, you access the first screen of the
selected transaction. If you did not specify a transaction or if you use
eCATT in the basis release Web AS 6.20, you must now start the
transaction by entering the corresponding transaction code.
Enable
Manual Command
Generation
Trigger Command
Generation
Execute the transaction as usual. If you use the manual mode you
must change back to the recording window (see Figure 6.19) and
trigger the creation of SAPGUI commands using the appropriate but-
ton. After the transaction has finished, you go back again and termi-
nate the recording.
Initial state Because the eCATT commands CHEGUI and GETGUI were not intro-
recording duced until the basis release of Web AS 6.40, a different option of
accessing field values had to be used in the basis release of Web AS
192
Testing Transactions with Controls 6.5
6.20. For this purpose, the initial state recording was implemented.
More detailed information about this can be found on the SAP Serv-
ice Marketplace1.
In the Record SAP GUI Command dialog box (see Figure 6.20), select Session ID and
the session to be recorded. At the beginning of a recording, eCATT connection ID
Values are
Automatically filled
Figure 6.20 Dialog Box for Starting the Recording in the New Session
With the basis release of Web AS 6.40, there are a number of func- Editing SAPGUI
tions for revising SAPGUI commands that have already been commands
1 See the SAP Service Marketplace, search for “Initial State Recording”, Link “Check-
ing Initial States”.
193
6 Test Automation with eCATT
the script execution dialog. As soon as the session has reached the
appropriate state, i. e. the end of the existing part of the script, return
to the script editor. From the Pattern dialog, select SAPGUI (Attach)
and execute the script recording as usual. The existing script is
extended by adding the new steps.
Joining SAPGUI To join SAPGUI commands, highlight them and open the context
commands menu. From the menu, select the Join item. A new SAPGUI com-
mand is created, and its command interface comprises the actions of
all highlighted commands. The old commands are marked as com-
ments.
Splitting SAPGUI Split functionality divides an SAPGUI command into several com-
commands mands. This ensures a better overview, but is even more important
in a re-recording, when a part of the command needs to be newly
recorded, and the command needs to be truncated in a specific
defined place. To split a long SAPGUI command, highlight the rele-
vant command. Open the context menu, and select the Splitting AT
submenu. With the basis release of Web AS 6.40, you can split com-
mands to specified granularities. You can choose between
왘 Transaction change
왘 Dynpro change
왘 Dialog step
왘 Methods/Property
With the basis release of Web AS 7.0, you can split in any place. A
number of new SAPGUI commands is created the command inter-
faces of which store the same actions as the highlighted command.
The highlighted command is marked as a comment.
194
Testing Transactions with Controls 6.5
Usually, scripts become clearer with many simple checks if you use
the CHEGUI command, particularly because the number of required
parameters can be reduced. When checking complex calculations,
however, it often makes more sense to first store the values to be
checked in parameters and then process their contents.
Confirm
After you click on the button, the SAP GUI is in selection mode. This Selection mode
means that a screen element is highlighted as soon as you place the
mouse over it. Click on the field the value that you want to read.
After selecting the corresponding field you are brought to the dialog
for editing the GETGUI/CHEGUI command (see Figure 6.22).
Because every screen element contains quite a number of properties,
you must decide which of these properties you want to check. Usu-
ally this is the input value of the field. For text fields, this is the Text
property to be found under Get/GeneralState/Text. For some other
screen elements, like list fields, for example, the input value is
named Value and can be found in the same place.
195
6 Test Automation with eCATT
Checking Within a CHEGUI statement, you can check several conditions. For
several this purpose, confirm with Insert and Continue, and select more
conditions
fields. If you select several conditions within a CHEGUI command,
the command is successful only if all specified conditions are met.
The conditions are therefore implicitly connected via and. To con-
clude the CHEGUI command, confirm with Insert and Exit. The con-
ditions for the checks are stored in the command interface of the
CHEGUI command. The fixed values used in the conditions can be
changed at a later stage or replaced with parameters.
Flexibility of the There are several possibilities for flexibly designing SAPGUI com-
recording mands. This enables you to cover several test variants with different
196
Testing Transactions with Controls 6.5
details in a single test script. You can also set the editing of a dynpro
to optional. In the command interface of the SAPGUI command, set
the ProcessedScreen[n]\Active value from “X” to “O” for optional.
The dynpro is edited only if it is displayed by the application. Other-
wise, this part of the script is skipped. The common use case of this
option is to handle popup windows in the script that, depending on
the input data or context, are either displayed or not (see Figure
6.23).
Condition 1:
Value 1 = LH
Condition 2:
Value 2 = 400
When processing a script using SAPGUI commands, you are pro- Start options
vided with separate SAPGUI-specific start options (see Figure 6.24). for the SAPGUI
driver
197
6 Test Automation with eCATT
198
Testing Transactions with Controls 6.5
Specify Granularity
Specify Directory
(on Frontend)
Conclusion
Transactions with controls can be recorded using the SAPGUI driver.
The selection of the correct granularity is very important in this con-
text, although it can be corrected at a later stage in more recent
eCATT versions. For reading and checking values, the GETGUI and
CHEGUI commands are available.
199
6 Test Automation with eCATT
Communication When a Web Dynpro transaction is recorded, the user handles the
while recording application via the browser as usual (see Figure 6.26). However, the
eCATT plug-in in the Web Dynpro runtime environment extends the
application so that the browser also sends specific control data for
eCATT in addition to requests to the application.
Callback
XML Simulator
Client
Simulator
Web Dynpro
eCATT
Runtime
(WDR)
eCATT
Plug-in
Browser User
Request
Response
Request
200
Testing Web Dynpro Applications 6.6
The URL for addressing the Web Dynpro application is structured as Structure
follows: of the URL
HTTP://<Server>:<Service>/<URL extension>/<Application>
If the WDR is based on Java, the extension has the following format:
The first step for recording a Web Dynpro-based application is the Creating the
creation the targets for the HTTP connections. Use Transaction SM59 connections
Enter hostname and port of the target system as well as a path prefix
(see Figure 6.28). Note the different prefixes for Java and ABAP
applications.
As soon as you have created and successfully tested the HTTP con-
nection, insert a logical target in the system data container. In the
http Destination column, store the newly created connection for this
target system.
201
6 Test Automation with eCATT
Port
Path Prefix
Target System
(Web Dynpro System)
Application
Aufzeichnung
Start Recording
202
Testing Web Dynpro Applications 6.6
In the Application input field, complete the basis URL of the connec-
tion with an application-specific part. This part depends on the appli-
cation to be recorded. The address parts are then merged by eCATT.
Click on the Start Recording button.
Web Dynpro
Application in the Browser
Operate Application
as Usual
Figure 6.30 Browser Window with Web Dynpro Application During the Recording
At the same time, another window opens and indicates that the
recording is running (see Figure 6.31).
Stop Recording
Here
203
6 Test Automation with eCATT
As soon as you have stopped the interaction with the Web Dynpros,
use the task bar to change to this window and stop the recording.
WEBDYNPRO
The WEBDYNPRO command is designed for addressing the Web Dynpro
driver. It has the following notation:
WEBDYNRPO (<Command interface>, [<Target system>] ).
The target system must be an HTTP connection of the G type (for Java
Server) or the H type (for ABAP Server).
Open the command interface of the command and search the values
input during the recording under SCREEN 폷 DATA. Like with an
SAPGUI command, you can parameterize the recording to link the
Web Dynpro command to the test data.
Parameterize Here
Messages Messages sent during the recording can also be found in the com-
mand interface under the PAGE/ SCREEN/MESSAGES node. As of the
basis realease of Web AS 7.0, you can process messages from Web
Dynpro applications via a MESSAGE ... ENDMESSAGE block as well
(see Section 6.9.3).
Start options for If you use the Web Dynpro driver, the start options are limited to the
the Web Dynpro selection of the processing mode. You have the following options:
driver
왘 If you select the Process in Background option, the script is pro-
cessed without being displayed in a user interface. The progress of
204
Testing Web Services 6.7
Conclusion
Web Dynpro applications can be recorded just like SAP GUI transac-
tions. The URL is opened automatically in a browser, the recording
takes place in parallel while the browser is being operated by the SAP
application.
With the basis release of Web AS 7.0, eCATT supports the automated
testing of web services. A web service is then called like an internal
ABAP function module. The necessary ABAP proxy classes are gener-
ated automatically.
Because the functionality of the eCATT web service driver is not lim- Testing
ited to testing web services provided via the SAP Web Application third-party-
solutions
Server, you indirectly obtain an interesting alternative for testing
third-party solutions. As long as the third-party system in your pro-
cess chain has a web service interface, you can integrate it seamlessly
in the test coverage via eCATT scripts.
205
6 Test Automation with eCATT
Because web services are function-like objects that do not allow for
direct user communication, no recording occurs in this place.
Instead, you specify a method call that is submitted to the web ser-
vice.
Server URL
Select Method
ABAP proxy For this purpose, you need an ABAP proxy object. This provides you
objects and WSDL with the stubs of the web service methods. If the web service is
implemented on an SAP Web Application Server and you know
upon which ABAP class it is based, you can select the corresponding
ABAP proxy class from the directory.
HTTP://<Server>:<Port>/
<Web Service Name>/Config?wsdl
As soon as the correct address for the service description has been
entered, click on the Generate Proxy Class button. eCATT queries
the capabilities of the web service and generates an ABAP proxy class
with appropriate stub methods. This generated class is entered
directly in the ABAP Proxy Class field. You need to assign the class to
a package.
206
Testing Web Services 6.7
Once you have a functioning proxy class you can select the visible
methods of the class in the ABAP Proxy Method field. Select the
wanted method from the list, and close the dialog box. eCATT then
generates a WEBSERVICE command in the script editor.
WEBSERVICE
The WEBSERVICE command is used for addressing web services. It has the
following format:
WEBSERVICE(<Command interface>, [<Target system>] ).
The command interface corresponds to the interface of the selected func-
tion from the ABAP proxy class. Usually, it is generated automatically from
the WSDL. Therefore you do not need to worry about the structure of the
transferred parameters. Just populate the command interface with appro-
priate values.
Conclusion
The web services test is fully supported and integrated with eCATT
in the basis release of Web AS 7.0. Due to the automatic generation
of ABAP proxy classes from WSDL descriptions, addressing a web
service is just as simple and comfortable as calling a function mod-
ule. In combination with Web Dynpros, this results in very elegant
possibilities of testing modern service-oriented solution landscapes
via different forms of access.
207
6 Test Automation with eCATT
Database
Document ID
Figure 6.35 Example of a Test Scenario with Web Dynpros and Web Services
208
Index
A D
AcceleratedSAP 43, 45 Data analysis 292
Accelerator 47 Data Dictionary 257
Active Global Support 76 Data reduction 254
allow (message) 218 Data transfer 259
Anonymization 255 Database overview 353
ASAP (AcceleratedSAP) 43 Database time 351
ASAP process model 44 Degree of test coverage 273
Authorizations 58 Developer test 32
Document management 80
B Dynpros, optional 197
BC-eCATT 208 E
Black box 35
Boundary value analysis 39 EarlyWatch Alert 75
Business blueprint (project phase) 44, eCATT 171
51, 82, 96 Equivalence class partition 37
Error guessing 40
C Error management process 54
Error recording 111
CATT 235 exit (message) 218
Change request 122 expected (message) 218
Change request management 76
Collaboration platform 74 F
Command (eCATT)
CHEGUI 195 fail (message) 218
CHETAB 225, 247 Filter 217
CHEVAR 214, 247 Final preparation 45
DO 221 Final preparation phase 61
GETGUI 194 Full copy 254
GETTAB 225 Function modules 248
IF 221 Functional tests 246
MESSAGE 216
REF 232 G
REFCATT 235
REFEXT 210 GoingLive Check 318
SAPGUI 190 Go-live and support 45, 67
TCD 183
Components, logical 85, 86 H
Cookies 310
Coverage Analyzer 269 History 113
CPU time 351 Hit ratio 352
CPU utilization 357
Customer development 272
365
Index
366
Index
367