eCATT

VSDK 3.0

Target Group and Prerequisites Target Group
 Implementation and integration teams  Quality managers supervising in-house development

Prerequisites
 Experience of software testing  An understanding of the architecture of the SAP Web Application Server (as provided in course SAPTEC)

© SAP AG 2005, Title of Presentation / Speaker Name / 2

Course Goals In this course, you will learn
 What and when you need to test in the SAP Solution Lifecycle  The advantages of eCATT for testing SAP systems compared with other automated test tools  How to set up your system environment for testing with eCATT  How to create test cases to test various different kinds of SAP applications  How to create executable tests, and how these can be managed using the SAP Test Workbench  How to migrate CATT objects to eCATT

© SAP AG 2005, Title of Presentation / Speaker Name / 3

I Unit 6 Testing Transactions . Title of Presentation / Speaker Name / 4 .Contents Unit 1 Getting Ready to Test Unit 5 Testing Transactions .III Unit 2 Getting Ready to Test with eCATT Unit 3 eCATT Scripts and the Script Editor Unit 8 Building Executable Tests Unit 9 Advanced Topics Unit 4 Non-UI Testing © SAP AG 2005.II Unit 7 Testing Transactions .

Unit 1: Getting Ready to Test .

Unit Objectives In this unit. you will learn:  When you need to test in your SAP environment  The advantages and disadvantages of manual and automated testing  Decision criteria for selecting an automated test tool  What can be tested using SAP eCATT © SAP AG 2005. Title of Presentation / Speaker Name / 6 .

Occasions for Testing New SAP installations Addition and integration of new components In-house developments  Functional Tests  Integration tests with other components Upgrades – regression testing Application of Legal Change Packages © SAP AG 2005. Title of Presentation / Speaker Name / 7 .

Title of Presentation / Speaker Name / 8 .Manual or Automated Testing Manual Testing  Requires a group of testers who must  Have lab space to work in  Be trained  Be released from their other duties (internal) or “bought-in” (external)  Is time-consuming  Offers little potential for reuse of test resources  But does have the advantage that manual testers spot errors and issues that are beyond the scope of the test plan Automated Testing  Requires fewer people and resources  Execution takes less time  Parameterization of fields allows replay with any number of different sets of values  Offers considerable possibilities for reusing test scripts  Makes it easier to reproduce errors that occur during testing © SAP AG 2005.

consider running that part manually! © SAP AG 2005. it doesn't necessarily have to be automated  Automation is a means to an end.The Economics of Testing Automated testing requires good planning and modeling Learning to use a new test tool takes time An automated test script will only give you maximum ROI if it is reusable A switch to automated testing requires investment and commitment Not every test scenario has to be automated  If it doesn't have to be repeatable. Title of Presentation / Speaker Name / 9 . If it is taking too long to automate the last 5% of your test scenario. not an end in itself.

Choosing an Automated Test Tool – External Tools Classic automated test tools can test an SAP System by driving the SAP GUI.. Title of Presentation / Speaker Name / 10 . Automated Test Tool Frontend Script SAPGUI Window .. But treat the SAPGUI Window as a standalone desktop application:  Generally not aware of the multiple tier solution  No access to what is happening on the application server or the database Backend © SAP AG 2005...

Title of Presentation / Speaker Name / 11 .Choosing an Automated Test Tool – SAP CATT CATT – Computer Aided Test Tool Available from Release 3.0 Advantages  Shipped free with SAP Basis System  Most effective testing method for SAP transactions Disadvantages  Control technology not fully supported  No support for tabular parameters of function modules  Only limited support for distributed system environments  Only limited support for external applications © SAP AG 2005.

Its design aims were to  Enable as many SAP transactions as possible to be tested automatically  Provide a simplified concept for testing in a complex system landscape  Allow reuse of test data by storing it in separate container objects  Leverage the benefits of the existing CATT eCATT is available with Release 6.20 of the SAP Web Application Server With it. Title of Presentation / Speaker Name / 12 .6C or higher (see note 519858 for details of required support packages) © SAP AG 2005.com solution that is running R/3 Basis Release 4. you can remotely test any mySAP.Choosing an Automated Test Tool .SAP eCATT The Extended Computer Aided Test Tool (eCATT) is the successor to SAP‘s CATT.

Title of Presentation / Speaker Name / 13 . .What Applications Can Be Tested Using eCATT? . . Using eCATT Together With a Certified External Tool Web-based Transactions Desktop-based transactions © SAP AG 2005. . Using Built-In eCATT Means Transactions in SAP GUI for Windows Transactions in SAP GUI for Java Function Modules and BAPIs . .

What Does Testing an Application Mean? Making the test reusable Setting checks on the application to make the test react to different circumstances Parameterizing the application to allow it to be replayed with varying values Recording the application so that it can be replayed © SAP AG 2005. Title of Presentation / Speaker Name / 14 .

20 APO © SAP AG 2005.20 to operate as a test server From this central test system. Title of Presentation / Speaker Name / 15 .6 Support Package 32 or higher R/3 eCATT CRM Web AS 6. you can test any other system that is running the component SAP_BASIS with Release 4.What Systems Can Be Tested Using eCATT? You require at least one SAP Web Application Server 6.

you have learned  Some of the issues you have to consider in deciding a test strategy  The functional test tools that are available from SAP  The scope of eCATT  The  The applications that you can test with it system landscape in which you can test © SAP AG 2005. Title of Presentation / Speaker Name / 16 .Unit Summary In this unit.

Unit 2: Getting Ready to Test With eCATT .

you will learn:  How a finished eCATT test case is put together  The different object types used in eCATT  How to set up a system for use with eCATT  Some of the security aspects that you need to consider © SAP AG 2005.Unit Objectives In this unit. Title of Presentation / Speaker Name / 18 .

A Finished Example Test Configuration System Landscape Description Test Instructions Data to drive the test Results Archive © SAP AG 2005. Title of Presentation / Speaker Name / 19 .

plus a system data container that describes the correct system landscape © SAP AG 2005.The Different Object Types Test Script The set of commands that forms the test System Data Container A list of systems that are addressed during the execution of a test script Test Data Container Reusable sets of data that can be used to run tests Test Configuration A test script. Title of Presentation / Speaker Name / 20 . combined with data from one or more test data containers.

Constructing an Automated Test Series What applications am I going to test? What does my system landscape look like? How can I best create an automated test for my applications? What data do I need to drive the tests? How can I organize my test cases? System data container Test data container 1 2 4 3 Test script 5 Test Workbench © SAP AG 2005. Title of Presentation / Speaker Name / 21 .

you must ensure that the CATT/eCATT flag is set to allow tests to run GUI Scripting  In order to use the new GUI Scripting functions.10: Support Package 32 Support Package 21 Support Package 17 Client Settings  In each client in which you want to test.20 with patch level =>18 and GUI Scripting installed © SAP AG 2005.Setting Up the System Support Package Levels  Each system in which you want to test must have at least the following support package level  4.6D:  6.6C:  4. Title of Presentation / Speaker Name / 22 . the following settings have to be made:  Profile  SAP parameter sapgui/user_scripting must be set to TRUE GUI must be Version 6.

Title of Presentation / Speaker Name / 23 . eCATT Web AS 6.Mapping the System Landscape 1. Test CRM transaction Check table entries in R/3 Run transaction in R/3 Call function module in APO RFC CRM R/3 APO Business Process © SAP AG 2005. 4.20 3. 2.

Title of Presentation / Speaker Name / 24 .Defining RFC Destinations Source System RFC Destination Client: Lang: User: Pwd: 100 EN tester letmein Target System Direct but unsafe Target Transaction Safe but cannot run unattended RFC Destination Client: 100 Lang: EN User: <current> Target Transaction © SAP AG 2005.

The system data container maps the logical name to a particular RFC destination. Title of Presentation / Speaker Name / 25 . © SAP AG 2005.Function of System Data Containers Test Script System Data Container Command With Logical Target Target < -.> RFC Dest. Target System The logical target describes the function of the system – for example R/3.

Title of Presentation / Speaker Name / 26 . . . RFC Destination XYZ . System Data Container © SAP AG 2005.Creating a System Data Container SAP Web AS 6.20 System under test Relationship described by RFC destination XYZ Target system R3 . . .

Changes in the script coding are not required. and user name for the logon – eliminates sources of errors  Access to SM59 and the authorization to create system data containers can be restricted to project leads Reuse  Using logical system names in a script means that the execution environment of the script can be changed by switching system data containers. Title of Presentation / Speaker Name / 27 .Advantages of System Data Containers Consistency  One container can serve a whole project  The RFC destinations can contain the client. language. © SAP AG 2005.

Title of Presentation / Speaker Name / 28 .Unit Summary In this unit. you have learned  The different object types with which you work in eCATT  How these object types support you in the various stages of planning an automated test project  How to set up a system to enable eCATT  How to define secure RFC destinations  How to create a system data container © SAP AG 2005.

Unit 3: eCATT Scripts and the Script Editor .

Title of Presentation / Speaker Name / 30 .Unit Objectives In this unit you will learn:  The structure of an eCATT script  The essential features of the eCATT script editor  The main aspects of the eCATT scripting language  How to work with parameters © SAP AG 2005.

Title of Presentation / Speaker Name / 31 . © SAP AG 2005. work out exactly what you want it to do Reusability Try to create small self-contained script modules.Design Considerations for a Script Definite Goal Before you write your script. This will make them more easily reusable.

Structure of a Script Test Script Attributes Parameters Importing Local variables Exporting Commands © SAP AG 2005. Title of Presentation / Speaker Name / 32 .

Script Attributes Administrative data about the script Search terms: Can be used in Infosystem Attaches system data container to script. Title of Presentation / Speaker Name / 33 . allowing access to other systems © SAP AG 2005.

Title of Presentation / Speaker Name / 34 .The Script Editor Parameter List Command Editor Structure Editor © SAP AG 2005.

Title of Presentation / Speaker Name / 35 . CHEVAR ( I_IMPORT <> 'UA' ). .Simple Parameters Creation Use I_IMPORT = 'LH'. © SAP AG 2005. . .

VAR ). GETLEN ( I_ITAB. I_ITAB[2]-CONNID = '0400'. © SAP AG 2005. Title of Presentation / Speaker Name / 36 .Structured Parameters Use I_STRUCTURE-CARRID = 'LH'.

Title of Presentation / Speaker Name / 37 .Script Language Recording and playback of applications Conditions Checks Loops Simulation of Customizing settings Calculations Reading table values Blocks of ABAP coding © SAP AG 2005.

Title of Presentation / Speaker Name / 38 .Commands for Recording Applications Recording and playback of applications FUN calls a function module TCD allows you to record and replay SAP transactions SAPGUI allows you to record sequences of screens containing controls An interface allows you to integrate test tools from third-party vendors with SAP eCATT © SAP AG 2005.

tool Yes Yes Does the application use controls? Yes No Use FUN Use TCD No No single driver provides the best solution for every application © SAP AG 2005. Title of Presentation / Speaker Name / 39 Are the controls essential within the transaction? Yes Use SAPGUI .Choosing the Right Driver Is the application a function module or BAPI? No Does the application run under SAP GUI for Windows or Java? No Use ext.

Title of Presentation / Speaker Name / 40 .Special Variables &SZBRC .Return code &TIME .Current time &DATE – Current date &YEAR – Current year &YEARA – Next year &YEARB – Last year &LPC – Loop counter &MSX – Number of messages returned by a transaction &USER – User name &CLIENT – Current client © SAP AG 2005.

Title of Presentation / Speaker Name / 41 . A command consists of:  The command keyword  Argument (the target object)  Interface (parameters that need to be passed)  Target system © SAP AG 2005. It allows you to build individual eCATT commands.Pattern Function The Pattern function is similar to the statement pattern in the ABAP Editor.

Title of Presentation / Speaker Name / 42 . which corresponds to:  The interface of a function module (for FUN)  The screen and field structure of a transaction (for TCD)  A list of user interactions (for SAPGUI)  The importing and exporting parameters of a referenced script Command interfaces are stored in XML format in the local system.Command Interface Most eCATT commands have a command interface. even if the object that they describe only exists in a remote system. © SAP AG 2005.

Unit Summary In this unit. Title of Presentation / Speaker Name / 43 . you have learned  The various areas of the eCATT Test Script Editor  The features of the eCATT script language  How to create eCATT parameters  How to use the pattern function in the eCATT Script Editor  Which driver to use for various kinds of applications © SAP AG 2005.

Unit 4: Non-UI Testing Function Modules and BAPIs Table Operations Inline ABAP .

Title of Presentation / Speaker Name / 45 .Unit Objectives In this unit you will learn:  How to test function modules and BAPIs  How to read from and test against the database  How to use blocks of ABAP coding to enhance your test scripts © SAP AG 2005.

Title of Presentation / Speaker Name / 46 .Choosing the Right Driver Is the application a function module or BAPI? Yes Use FUN © SAP AG 2005.

Non-UI Testing: Function Modules Unit Test Function Module Whole Backend Process Function Module Utility Within a Script Transaction Function Module Function Module Function Module Transaction © SAP AG 2005. Title of Presentation / Speaker Name / 47 .

Command Interface Importing Exporting Changing Tables Exceptions Function Module © SAP AG 2005. <interface>. [<target>] ).Testing Function Modules FUN ( <function module>. Title of Presentation / Speaker Name / 48 .

Title of Presentation / Speaker Name / 49 . © SAP AG 2005. INTERFACE-TABLES-TABLE[idx]-FIELDNAME = value.Parameterizing the Interface or INTERFACE-IMPORTING-PARAMETERNAME = value. INTERFACE-IMPORTING-STRUCTURE-FIELDNAME = value.

Title of Presentation / Speaker Name / 50 .Trapping Exceptions Interface Exceptions DATA_INCOMPLETE CREATE_FAILED Interface Exceptions DATA_INCOMPLETE CREATE_FAILED © SAP AG 2005.

Title of Presentation / Speaker Name / 51 . [DEST] ). Application Table Customizing Table © SAP AG 2005. INTF. [DEST] ). SETTAB ( TAB. [DEST] ). INTF. CHETAB ( TAB. [DEST] ). RESTAB ( TAB.Table Operations Test Script Database GETTAB ( TAB. INTF.

ENDABAP. Parameters Name Description V_TAB SFLIGHT-table Value <INITIAL> I/E/V V Ref Type SFLIGHT[] ABAP. Title of Presentation / Speaker Name / 52 . * Any ABAP Coding that is allowed in a subroutine * may appear here ENDABAP.Using Inline ABAP ABAP. “Once-off” query © SAP AG 2005. Expecting a result set of more than one line. SELECT * FROM sflight INTO TABLE v_tab WHERE carrid = ‘LH’ AND connid = ‘0400’. No corresponding function module available.

Title of Presentation / Speaker Name / 53 .Unit Summary In this unit you have learned:  How to test function modules and BAPIs  How to read from and test against the database  How to use blocks of ABAP coding to enhance your test scripts © SAP AG 2005.

Unit 5: Testing Transactions .I Testing conventional transactions using the TCD command .

read output fields. and perform fields checks with the TCD command © SAP AG 2005. Title of Presentation / Speaker Name / 55 .Unit Objectives In this unit you will learn:  What transactions are suitable for testing using the TCD command  How to record a transaction using the TCD command  How to set input fields.

Title of Presentation / Speaker Name / 56 .Choosing the Right Driver Is the application a function module or BAPI? No Does the application run under SAP GUI for Windows or Java? Yes Does the application use controls? Yes No Are the controls essential within the transaction? No Use TCD © SAP AG 2005.

Title of Presentation / Speaker Name / 57 . and read or set checks against its output fields © SAP AG 2005.Characteristics of the TCD Command The TCD command is the recording technique that was used to test transactions in CATT It is based on the Batch Input Interface It allows you to record a transaction. parameterize its input fields.

Background: The Batch Input Interface Background: Data-consistency checks in SAP transactions are often implemented within the coding of the screen flow logic (Process After Input)

Batch Input is a technique originally developed for data transfer from legacy systems into an R/3 System that processes transactions in the background

CATT used this technique for unattended transaction testing. It is a very efficient testing method, and has consequently been retained in eCATT

© SAP AG 2005, Title of Presentation / Speaker Name / 58

The TCD Command

TCD ( transaction, interface, [sys] )

Same system

Different system

© SAP AG 2005, Title of Presentation / Speaker Name / 59

How TCD Really Works - Recording

ENTER

FIELD VBAK-AUART VBAK-VKORG . . . BDC_OKCODE

VALUE AF 1000 ENT2

FIELD KUAGV-KUNNR VBAP-MATNR . . . BDC_OKCODE

VALUE 1280 P-103 SICH

© SAP AG 2005, Title of Presentation / Speaker Name / 60

. .Replay No SAP GUI session Field values FIELD VBAK-AUART VBAK-VKORG . BDC_OKCODE VALUE 1280 P-103 SICH © SAP AG 2005. . Title of Presentation / Speaker Name / 61 . .How TCD Really Works . BDC_OKCODE VALUE AF 1000 ENT2 Function code FIELD KUAGV-KUNNR VBAP-MATNR .

The Command Interface Transaction Screen Field Field Field Screen Field Field © SAP AG 2005. Title of Presentation / Speaker Name / 62 .

Title of Presentation / Speaker Name / 63 .Parameterizing Input Fields You can replace the recorded values with either literals or variables Field name Double-click Value © SAP AG 2005.

.Reading and Checking Output Fields To. 'G' 'C' Field name in VALIN column Will contain value from output field at the end of the transaction Contains the value that must be present in the screen field at runtime © SAP AG 2005... Title of Presentation / Speaker Name / 64 . Read a value Check a value MODE must be..

number) Message variables (up to four) Number of messages &MSX Full text of message (in logon language) © SAP AG 2005. Title of Presentation / Speaker Name / 65 . ID.Message Handling TCD Command Interface Location of message (program and screen) Message attributes MSG Internal Table (type.

Title of Presentation / Speaker Name / 66 .Reading Message Contents Addressing the Last Message <interface>-MSG[&MSX]-<component> Looping Through All Messages DO &MSX. <interface>-MSG[&LPC]-<component> ENDDO. © SAP AG 2005.

TCD ( EC_TUTORIAL_TCD. TCD ( EC_TUTORIAL_TCD. © SAP AG 2005. Title of Presentation / Speaker Name / 67 . Tolerate all messages ON_LAST_MESSAGE_CHECK ( * ). EC_TUTORIAL_TCD_1 ).Testing Messages Require that a particular message is sent ON_LAST_MESSAGE_CHECK ( 031 ). EC_TUTORIAL_TCD_1 ).

Troubleshooting the TCD Command © SAP AG 2005. Title of Presentation / Speaker Name / 68 .

and perform fields checks with the TCD command © SAP AG 2005.Unit Summary In this unit you have learned:  What transactions are suitable for testing using the TCD command  How to record a transaction using the TCD command  How to set input fields. read output fields. Title of Presentation / Speaker Name / 69 .

Unit 6: Testing Transactions .II Testing control-based transactions using the SAPGUI command .

read output fields.Unit Objectives In this unit. Title of Presentation / Speaker Name / 71 . you will learn:  Why the TCD driver is not suitable for testing all transaction types  How GUI Scripting works  How to use the eCATT SAPGUI command to record a transaction  How to set input fields. and perform field checks in a SAPGUI recording © SAP AG 2005.

Choosing the Right Driver Is the application a function module or BAPI? No Does the application run under SAP GUI for Windows or Java? Yes Does the application use controls? Yes Are the controls essential within the transaction? Yes Use SAPGUI © SAP AG 2005. Title of Presentation / Speaker Name / 72 .

Why TCD Cannot Test Everything SAP GUI Window Control ALV Tree Calendar New recording component OCX control under Windows Bean under Java Action leads to local processing in SAP GUI Frontend Backend TCD Recorder eCATT Application Logic Action leads to event handler on application server © SAP AG 2005. Title of Presentation / Speaker Name / 73 .

Title of Presentation / Speaker Name / 74 .20) eCATT at backend © SAP AG 2005.Introducing GUI Scripting Scripting host in GUI (Requires SAP GUI 6.

Recording the SAPGUI Command – Procedure 1. Set the scripting granularity © SAP AG 2005. Select SAPGUI(Record) 2. Title of Presentation / Speaker Name / 75 .

Pick the relevant initial states to record © SAP AG 2005. Title of Presentation / Speaker Name / 76 .Procedure 3. Confirm that you want to record 4.Recording the SAPGUI Command .

Scripting Granularity
Action Action Action Action Action Action Action Session Action Action Action Action Action Action Action Transaction T: New Transaction
© SAP AG 2005, Title of Presentation / Speaker Name / 77

Action Action Action Action Action Action Action Screen S: New Screen

S

T S

Making Sense of the Command Interface - 1

One ProcessedScreen node per screen

UserChangedState describes the user actions on the screen
© SAP AG 2005, Title of Presentation / Speaker Name / 78

Parameterizing an Input Value

Field name

Enter parameter name in this field

Double-click

© SAP AG 2005, Title of Presentation / Speaker Name / 79

Title of Presentation / Speaker Name / 80 .Recording the SAPGUI Command – Initial State © SAP AG 2005.

check that the values in the fields correspond to the recorded initial states Inactive Checks  Record the initial states of the selected screen element types so that they can be placed into script parameters and used in the rest of the script © SAP AG 2005.Active and Inactive Checks Active Checks  Record the initial states of the selected screen element types  On replay. Title of Presentation / Speaker Name / 81 .

Title of Presentation / Speaker Name / 82 .Making Sense of the Command Interface .2 One InitialState node per processed screen Are checks active? Field name Field value during recording © SAP AG 2005.

Retrieving an Output Value Double-click Enter parameter name in this field © SAP AG 2005. Title of Presentation / Speaker Name / 83 .

Title of Presentation / Speaker Name / 84 .Activating and Deactivating Field Checks © SAP AG 2005.

Title of Presentation / Speaker Name / 85 .Message Handling – MESSAGE Stipulate that certain messages must/must not occur in order for the script to be a success Find out what messages occurred during a particular block of SAPGUI commands © SAP AG 2005.

ENDMESSAGE MIDX <n> 2 3 MODE F A A MSGTYP E E S MSGID MSGNR MSGV1 LH MSGV2 0400 MSGV3 MSGV4 ECDEMO 003 ECDEMO 021 XY 100 E_MSG_1 E_MSG_1[1]-MIDX contains the total number of messages in the table © SAP AG 2005. Title of Presentation / Speaker Name / 86 .Message Handling .

Title of Presentation / Speaker Name / 87 .Creating Rules in the MESSAGE Statement Rule = What to do + Message qualification What to do R: E: A: F: Require Expect Allow Fail Message qualification Message Type Message Class Message Number Mode Any combination of Continue processing or jump directly to ENDMESSAGE? Exit © SAP AG 2005.

Title of Presentation / Speaker Name / 88 .Some Sample Message Rules “Tolerate all error messages” Mode 'A' Exit MSGTYP 'E' ID Number “Fail script and jump to ENDMESSAGE on error message ZJM 001” Mode 'F' Exit 'X' MSGTYP ID Number 'E' 'ZJM' '001' © SAP AG 2005.

Title of Presentation / Speaker Name / 89 .Default Message Handling Rules User-defined Rules Allow Success Information messages Warning Error Termination messages Dump Fail and Exit © SAP AG 2005.

Message Processing Look up in user-defined rules New Message Look up in default rules Discard  Process according to rule © SAP AG 2005. Title of Presentation / Speaker Name / 90  Process according to rule .

The SAPGUI Command Interface 4 System Information © SAP AG 2005. Title of Presentation / Speaker Name / 91 .

Title of Presentation / Speaker Name / 92 .Activating and Deactivating Screens Active = ‘X’: Screen active Active = ‘ ’: Screen inactive Active = ‘O’: Screen optional Screen 1 Screen 2 Screen 3 “Join” OK? © SAP AG 2005.

Title of Presentation / Speaker Name / 93 .Troubleshooting in the SAPGUI Command Set automation queue behavior Run commands with stops at various granularity levels Close GUI sessions or leave them open for inspection © SAP AG 2005.

and the things that you have to consider when doing so © SAP AG 2005. you learned:  Why the TCD driver is not suitable for testing all transaction types  How GUI Scripting works  How to use the eCATT SAPGUI command to record a transaction  How to set input fields. and perform field checks in a SAPGUI recording  How to activate and inactivate screens in a script. read output fields. Title of Presentation / Speaker Name / 94 .Unit Summary In this unit.

Unit 7: Testing Transactions .III Testing Web.and Desktop-based Applications Using an External Tool .

Unit Objectives In this unit. and when you have to use an external tool  Why SAP chose to work with external tools  The advantages of the external tool integration  How the integration works © SAP AG 2005. you will learn:  When to use TCD and SAPGUI. Title of Presentation / Speaker Name / 96 .

Title of Presentation / Speaker Name / 97 . tool © SAP AG 2005.Choosing the Right Driver Is the application a function module or BAPI? No Does the application run under SAP GUI for Windows or Java? No Use ext.

Title of Presentation / Speaker Name / 98 .Configuring The System for an External Tool Run function module SET_EXTERNAL_TOOL in test mode Run program ECATT_GENERATE_ET_USER to generate service user Regenerate authorizations in role SAP_ECET © SAP AG 2005.

Title of Presentation / Speaker Name / 99 .External Tool Integration .Architecture Application Server Database eCATT Script with Attributes Scripts stored in SAP database Frontend Physical script commands Application Under Test External Tool © SAP AG 2005.

Title of Presentation / Speaker Name / 100 .Using Compuware TestPartner to Record a Script Checks VBA Functionality Parameterization Recording © SAP AG 2005.

Passing Arguments To and From TestPartner – Argument Container eCATT Argument Container Script TestPartner © SAP AG 2005. Title of Presentation / Speaker Name / 101 .

.. ExportParam As String ImportParam = GetEcattArg("I_NAME") . Dim ImportParam As String. . ..Passing Arguments To and From TestPartner – Script Coding Argument Container Name I_Name E_Value Sub Main () Type String String Direction IMPORT IMPORT . ExportParam End Sub Script: VBA Coding © SAP AG 2005. SetEcattArg "E_VALUE". .. Title of Presentation / Speaker Name / 102 ....

Title of Presentation / Speaker Name / 103 .Uploading Scripts Projects for upload Script name and version Administrative settings © SAP AG 2005.

Calling External Scripts REFEXT ( SCRIPT. Title of Presentation / Speaker Name / 104 . © SAP AG 2005. VERSION ). INTERFACE.

Title of Presentation / Speaker Name / 105 .Unit Summary In this unit. and when you have to use an external tool  Why SAP chose to work with external tools  The advantages of the external tool integration  How the integration works © SAP AG 2005. you have learned:  When to use TCD and SAPGUI.

Unit 8: Building Executable Tests Calling Other Test Objects Test Configurations and Test Data Containers The Test Workbench .

Unit Objectives In this unit. you will learn:  How you can modularize tests at script level  The difference between a test script and a test configuration  How to create test configurations  How to manage test data © SAP AG 2005. Title of Presentation / Speaker Name / 107 .

Title of Presentation / Speaker Name / 108 . that is  External  Existing scripts CATT procedures © SAP AG 2005.Modularization at Script Level There are two reasons for modularization:  To split up parts of a process into separate eCATT scripts to increase the possibility of reusing them  To allow the integration of non-eCATT objects.

[TARGET]). INTERFACE.REF Scripts can call other scripts: REF ( SCRIPT. Create Order REF REF REF REF Manufacturing Billing ATP Check © SAP AG 2005. Title of Presentation / Speaker Name / 109 .

CATT Procedure © SAP AG 2005. TGT ). INTERFACE. you can call CATT procedures residing in the same system: REFCATT ( CATT. REFCATT ( CATT. [TARGET] ). INT.REFCATT From eCATT. Title of Presentation / Speaker Name / 110 TGT .

INTERFACE. INT. REFCATT ( CATT.REMOTECATT You can also call CATT procedures that reside in a remote system: REMOTECATT ( CATT. Title of Presentation / Speaker Name / 111 EXE . CATT Procedure in TGT © SAP AG 2005. TARGET ). TGT ).

<target>. System mapping Script © SAP AG 2005.Test Configuration Data . <interface>. <target>. Title of Presentation / Speaker Name / 112 System data container . <interface>.Variants Importing Parameters Command Command Command Command <interface>. <interface>. <target>. <target>.

Manual Variants Quick entry for a few variants Cut and paste possible from delimited text file (Excel) Variants bound to a single configuration – not reusable © SAP AG 2005. Title of Presentation / Speaker Name / 113 .

Reusing Test Data: Test Data Containers Variants Test data container Test data container Importing Parameters Command Command Command Command <interface>. <target>. <interface>. System mapping Script © SAP AG 2005. <interface>. <interface>. Title of Presentation / Speaker Name / 114 System data container . <target>. <target>. <target>.

Test Data Container Parameters Name Value Airline LH Date Ref System S_CARR_ID ABAP Type Length D 8 Variants Variant Var1 Var2 Description Data Data Airline AA LH Date 01.2002 © SAP AG 2005.04.2002 01.04. Title of Presentation / Speaker Name / 115 .

Managing Test Data 1 Test Script Parameters P1 P2 P3 Test Data Container Parameters P1 P2 P3 © SAP AG 2005. Title of Presentation / Speaker Name / 116 .

P4. Title of Presentation / Speaker Name / 117 . P5. P3. P6 © SAP AG 2005.Managing Test Data 2 Test Script Parameters P1 P2 P3 Test Script Parameters P1 P4 P5 Test Script Parameters P2 P5 P6 Test Data Container Parameters P1. P2.

Parameter Group n © SAP AG 2005. Title of Presentation / Speaker Name / 118 ...Managing Test Data 3 Test Script 20 Parameters Test Script 15 Parameters Test Script 24 Parameters Test Data Container Parameter Group 1 Test Data Container Parameter Group 2 Test Data Container .

Title of Presentation / Speaker Name / 119 .Variant Wizard Start variant wizard Test Data Container Variants Configuration Variants Variants © SAP AG 2005.

Managing Test Data .Example I_CARRID I_CONNID I_FLDATE I_FARE I_CURR I_TYPE I_MAX_E I_MAX_B.. LH LH LH QF QF 0400 0400 0400 0006 0006 20030101 20030102 20030103 20030101 20030102 600 750 600 1500 1850 EUR EUR EUR AUD AUD 747 747 747 747 747 250 250 250 250 250 40 40 40 40 40 © SAP AG 2005.. Title of Presentation / Speaker Name / 120 .

Managing Test Data . Title of Presentation / Speaker Name / 121 Test Configuration Data for a particular test case .Example Test Data Container AIRLINES Maximize reuse Minimize redundancy Test Data Container AIRCRAFT © SAP AG 2005.

Modularization at Test Organizer Level Test Catalog Test Plan User Test Package Test Configuration Test Configuration © SAP AG 2005. Title of Presentation / Speaker Name / 122 .

Unit Summary In this unit, you have learned:
 How you can modularize tests at script level  The difference between a test script and a test configuration  How to create test configurations  How to manage test data

© SAP AG 2005, Title of Presentation / Speaker Name / 123

Unit 9: Advanced Topics

Versioning of Scripts Migrating CATT Procedures

Unit Objectives In this unit, you will learn
 Why script versioning is necessary  How to create different versions of a script  How the system picks the correct version of a script for execution  How to migrate CATT procedures to eCATT

© SAP AG 2005, Title of Presentation / Speaker Name / 125

you can create different versions of the same script. Title of Presentation / Speaker Name / 126 . transaction with / without controls).Versioning For different implementations of the same test (for example. © SAP AG 2005.

4.6C © SAP AG 2005. Title of Presentation / Speaker Name / 127 .6C R/3 Rel. Data Target Sys.How Versioning Works Test Configuration Script Sys. Version 1: SAP_APPL 46C EC_DEMO EC_DEMOSYSTEMS R3 Version 2: SAP_APPL 470 Release? 4.

Title of Presentation / Speaker Name / 128 .Specifying the Validity of a Version Target System © SAP AG 2005.

Backup Versions Version 1 SAP_BASIS 610 Version 2 SAP_BASIS  Backup 620 Version 3 SAP_BASIS 620 © SAP AG 2005. Title of Presentation / Speaker Name / 129 .

Title of Presentation / Speaker Name / 130 .Migration Test System CATT Module Target System ‘X’ CATT Module eCATT Migration Function New eCATT Script New eCATT Script With target system X © SAP AG 2005.

Migrating Variants Test System New eCATT Script with target system X Target System ‘X’ CATT Module Script Target System X Variants Variants Test Configuration © SAP AG 2005. Title of Presentation / Speaker Name / 131 .

Recursive Migration Test System New eCATT Script with target system X Target System ‘X’ CATT Module REF… REF… REF… REF… New eCATT Script New eCATT Script with target system X CATT Module CATT Module © SAP AG 2005. Title of Presentation / Speaker Name / 132 .

Unit Summary In this unit. you have learned  Why script versioning is necessary  How to create different versions of a script  How the system picks the correct version of a script for execution  How to migrate CATT procedures to eCATT © SAP AG 2005. Title of Presentation / Speaker Name / 133 .

you have learned  What and when you need to test in the SAP Solution Lifecycle  The advantages of eCATT for testing SAP systems compared with other automated test tools  How to set up your system environment for testing with eCATT  How to create test cases to test various different kinds of SAP applications  How to create executable tests.Course Summary In this course. and how these can be managed using the SAP Test Workbench  How to migrate CATT objects to eCATT © SAP AG 2005. Title of Presentation / Speaker Name / 134 .

SAP shall have no liability for damages of any kind including without limitation direct. either express or implied. Intelligent Miner. No part of this document may be reproduced. All other product and service names mentioned are the trademarks of their respective companies. VideoFrame. Oracle is a registered trademark of Oracle Corporation. IBM. National product specifications may vary. including but not limited to the implied warranties of merchantability. HTML. This document is a preliminary version and not subject to your license agreement or any other agreement with SAP. or consequential damages that may result from the use of these materials. OS/390.             The information in this document is proprietary to SAP. xSeries. This document contains only intended strategies.. XML. Parallel Sysplex. AIX. ICA. Title of Presentation / Speaker Name / 135 . copied. SAP NetWeaver and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. Massachusetts Institute of Technology. SAP does not warrant the accuracy or completeness of the information. or non-infringement. and/or development. SAP has no control over the information that you may access through the use of hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-party Web pages     © SAP AG 2005. Inc. Windows. Program Neighborhood.Copyright 2005 SAP AG. DB2 Universal Database. XHTML and W3C are trademarks or registered trademarks of W3C®. MVS/ESA. World Wide Web Consortium. DB2. SAP. pSeries. AFP. fitness for a particular purpose. The statutory liability for personal injury and defective products is not affected. WebSphere. JavaScript is a registered trademark of Sun Microsystems. X/Open. xApps. Java is a registered trademark of Sun Microsystems. R/3. OS/2. or transmitted in any form or for any purpose without the express prior written permission of SAP AG. Inc. xApp. MetaFrame. This document is provided without a warranty of any kind. product strategy. special. and functionalities of the SAP® product and is not intended to be binding upon SAP to any particular course of business. OSF/1. developments. Netfinity. AS/400. SAP assumes no responsibility for errors or omissions in this document. S/390. or other items contained within this material. MaxDB is a trademark of MySQL AB. mySAP. used under license for technology invented and implemented by Netscape. UNIX. Inc. OS/400. text. and Informix are trademarks or registered trademarks of IBM Corporation in the United States and/or other countries. indirect. Citrix. Please note that this document is subject to change and may be changed by SAP at any time without notice. mySAP. Tivoli. The information contained herein may be changed without prior notice. Outlook. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. iSeries. zSeries. z/OS. Data contained in this document serves informational purposes only. WinFrame.com. Sweden. graphics. and PowerPoint are registered trademarks of Microsoft Corporation. links. and Motif are registered trademarks of the Open Group. and MultiWin are trademarks or registered trademarks of Citrix Systems. All Rights Reserved  No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. This limitation shall not apply in cases of intent or gross negligence. Microsoft.

This limitation shall not apply in cases of intent or gross negligence. Intelligent Miner. SAP assumes no responsibility for errors or omissions in this document. or transmitted in any form or for any purpose without the express prior written permission of SAP AG. MaxDB ist eine Marke von MySQL AB. indirect. MVS/ESA. SAP. mySAP. Outlook. developments. AS/400. Parallel Sysplex. and functionalities of the SAP® product and is not intended to be binding upon SAP to any particular course of business. UNIX. Citrix. Inc. und MultiWin sind Marken oder eingetragene Marken von Citrix Systems. Die Angaben im Text sind unverbindlich und dienen lediglich zu Informationszwecken. pSeries. X/Open. SAP NetWeaver und weitere im Text erwähnte SAP-Produkte und -Dienstleistungen sowie die entsprechenden Logos sind Marken oder eingetragene Marken der SAP AG in Deutschland und anderen Ländern weltweit. Massachusetts Institute of Technology. or consequential damages that may result from the use of these materials. text. ohne die ausdrückliche schriftliche Genehmigung durch SAP AG nicht gestattet. Tivoli. und PowerPoint sind eingetragene Marken der Microsoft Corporation. zu welchem Zweck und in welcher Form auch immer. MetaFrame. OSF/1. WebSphere. XML. JavaScript ist eine eingetragene Marke der Sun Microsystems. xApps. und Informix sind Marken oder eingetragene Marken der IBM Corporation in den USA und/oder anderen Ländern. AFP. OS/390. Windows. Oracle ist eine eingetragene Marke der Oracle Corporation. In dieser Publikation enthaltene Informationen können ohne vorherige Ankündigung geändert werden. graphics. fitness for a particular purpose. Netfinity. Die von SAP AG oder deren Vertriebsfirmen angebotenen Softwareprodukte können Softwarekomponenten auch anderer Softwarehersteller enthalten. Alle anderen Namen von Produkten und Dienstleistungen sind Marken der jeweiligen Firmen. XHTML und W3C sind Marken oder eingetragene Marken des W3C®. Program Neighborhood. xSeries. Schweden. No part of this document may be reproduced. ICA. und Motif sind eingetragene Marken der Open Group. Alle Rechte vorbehalten  Weitergabe und Vervielfältigung dieser Publikation oder von Teilen daraus sind. This document contains only intended strategies. including but not limited to the implied warranties of merchantability. iSeries. or non-infringement. DB2 Universal Database. Title of Presentation / Speaker Name / 136 .             The information in this document is proprietary to SAP. AIX. SAP shall have no liability for damages of any kind including without limitation direct. Microsoft. or other items contained within this material. Inc. zSeries. HTML. S/390. IBM.Copyright 2005 SAP AG. R/3. This document is provided without a warranty of any kind. Please note that this document is subject to change and may be changed by SAP at any time without notice. WinFrame. World Wide Web Consortium. OS/2. Java ist eine eingetragene Marke von Sun Microsystems. copied. either express or implied. SAP has no control over the information that you may access through the use of hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-party Web pages     © SAP AG 2005. verwendet unter der Lizenz der von Netscape entwickelten und implementierten Technologie. This document is a preliminary version and not subject to your license agreement or any other agreement with SAP.com. product strategy. Produkte können länderspezifische Unterschiede aufweisen. OS/400. mySAP.. DB2. z/OS. Inc. and/or development. xApp. VideoFrame. SAP does not warrant the accuracy or completeness of the information. special. The statutory liability for personal injury and defective products is not affected. links.

Sign up to vote on this title
UsefulNot useful