(Extended Computer Aided Test Tool )


eCATT- An Introduction eCATT-Extended Computer Aided Test Tool eCATT: Creating Test Scripts Understanding eCATT eCATT: Creation of Test Data Container Creating Test Cases using eCATT eCATT: Creating & Executing Test Configurations eCATT: Creating a Test Case for a Web Dynpro Application This Weblog will discuss how to create a Test Case for a Web DynPro Application. This is one of the major features of eCATT that allows users to test business processes that cross system boundaries. Procedure to create eCATT script Writing a CAT script to create user



4. 5.

6. 7.

1.Introduction to eCATT.

The Extended Computer Aided Test Tool is a new automated testing tool that allows you to create automated functional test cases for the majority of applications running in the SAP GUI for Windows and SAP GUI for Java environments. Like other test tools, it works by making a recording of an application, which you can then parameterize and replay with differing sets of input values. You can test the behavior of the application by reading and testing the values returned by the application .eCATT is available from Release 6.20 of the SAP Web Application Server, and is an integral part of the mySAP Technology underlying SAP R/3 Enterprise Release 4.7. Designed as a successor to the existing CATT, it allows a user to record and replay any application running under SAP GUI for Java or SAP GUI for Windows. Furthermore, because it is embedded within the SAP application server, it has access to other interfaces, such as function modules, BAPIs, or the SAP database (so that users can perform checks), and the ABAP runtime, which lets users write ABAP routines into test cases. With SAP eCATT, users are also able to test business processes that cross system boundaries. Each command in a test script can have a separate destination so, within one script, a user can call a transaction in mySAP Customer Relationship Management, and also check table entries in an SAP R/3 system. Within a script, logical names are used to refer to target systems. These logical names are mapped to actual RFC destinations in a separate object called a system data container, which is, effectively, a description of the company’s system landscape. Thus by linking a different system data container with a script, a user can execute it in a completely different system landscape without having to alter the script coding at all. The only prerequisite is that all the logical system names that the script uses are defined in the relevant system data container.Because of the wide variety of applications that may need to be tested, eCATT does not have a single "one-size-fits-all” way of recording and replaying applications. Instead, there are various drivers that encompass the following kinds of scenarios: • Table operations– interacting with the SAP database • Function modules and BAPIs • ABAP • Transactions and reports • Applications running outside the SAP GUI for Windows or Java environments For the last of these scenarios, eCATT offers an interface that third-party tool manufacturers can implement to integrate their tools with eCATT. You can migrate test cases from Computer Aided Test Tool (CATT) to take advantage of the better features of eCATT. eCATT is also integrated with the Object Navigator (SE80). Features Using eCATT we can:

• Test transactions, reports, and scenarios

• Call BAPIs and function modules • Test remote systems • Check authorizations (user profiles) • Test updates (database, applications, GUI) • Test the effect of changes to customizing settings • Check system messages


eCATT runs in a system based on SAP Web Application Server 6.20 or higher. However, you can use this system to test systems with Release 4.6C or higher. In my forth coming weblog’s I will be going through the following topics :

1. Creating Test Scripts . 2. Creating Test Data Containers . 3. Understanding System Data Containers . 4. Executing Test Configurations . 5. Understanding Logs . I will also demonstrate the use of eCATT with following applications: • Testing a Standard SAP Business Scenario . • Testing a Web Dynpro Application . • Migrating Test Cases from CATT to eCATT

In the Table/View field. Maintaining Table T000 a. e. Choose Display. 3. In this weblog I will be going a step further and explain the creation of Test Scripts .) a. e . Start transaction RZ11. On the Maintain Profile Parameters screen. ( Check whether SAP GUI Scripting component is installed. In the Display Profile Parameter Attributes screen. On any screen.. Now we will start with creation of Test Scripts : The first step in the Creation of Test Case is Creation of Test Scripts . c. Choose Apply. A test script consists of three principal parts• • • Its attributes The script commands The parameters We will be creating a Test Scripts for Sales Order Scenario . 1. b. select the relevant client and choose. Enabling Scripting on application server . In the Change View “Clients”: Overview screen. d. b. c. c. Choose the Scripting tab. Select Enable Scripting. d.. e. select an entry that allows eCATT. eCATT: Creating Test Scripts Understanding eCATT Creation of Test Scripts In my last weblog on “eCATT : An Introduction” I introduced the subject of eCATT and discussed the capabilities and features of the same . a. . In the Restrictions when Starting eCATT field. Enter TRUE in the New value field. enter T000. choose Customizing of local layout. Start transaction SM31. b. Choose Maintain. the first step in the creation of Test Cases using eCATT Before creating Test Scripts using eCATT we need to have some system setting done .. enter sapgui/user_scripting. d.2. Enabling Scripting at the front End . Choose Options. There is an option for installing this component when installing the SAP GUI. 2. choose Change value.

.Step1 : Goto Transaction SECATT : Now the Recording for the Transaction VA01 will start .We will Record and save the Transaction .


. Only those parameters should be defined which are expected to take values at runtime. Now Define Parameters .After Recording is saved TCD Command Appears in the Command Editor.

For each screen traversed screen name and screen number appears . On clicking the “Command Interface” Option the interface appears in left bottom corner of the screen . Within each screen all the Input values that were entered during Recording are parameterized . .On clicking the Toggle Option : The Command Editor Appears .

System Data Containers and Test Configurations to complete the Test Case for the Sales Order Scenario. save the Script .When all the screen input fields are parameterized . This Creates the Test Script for the Sales Order Scenario. . In the next Weblogs I will be discussing Test Data Containers .

creation of Test script was covered in the previous weblog . : Creating Test Data Container . In this weblog we will continue the flow and cover Creation of “ Test Data Container” and “System data Container “ for the Test Scenario. The first step for Creation of Test Case i. eCATT: Creation of Test Data Container Creating Test Cases using eCATT Creation of Test Data Container: In my last weblog we were discussing creation of Test Case for Sales Order Scenario .e.3. Transaction ‘SECATT’.

These Variants define the different set of values with which the Scenario will be tested . In the above case the Sales Order Creation will be tested for different set of Sales Area Data ( different distribution channels in namely: 10 12 & 16 ) After creation of Test Data Container . . The Script will be Tested with these 3 variants . and enter a literal or the name of a parameter in the VALIN column.Now Create Variants for the Test Case . Parameterizing Input Fields : You must set the field mode to ‘S’. In the test script the parameters are assigned to the Input values/Output Values . At runtime. the screen field will be filled with the value that you specified.

the parameter will be filled with the value from the screen field. and enter the name of a parameter in the VALIN column.Parameterizing Output Fields : You must set the field mode to ‘G’. At runtime. Now Creation of System data Container : .

Since we are not Doing Remote Testing .Transaction ‘SECATT’.Therefore Test System is “NONE” (In Case of Remote Testing RFC destination has to be created in SM59 and should be specified under “RFC Destination Tab”) In the next weblog Creation of “Test Configuration” and Execution of the Test Case will be covered thus completing the Test Case for Sales Order Scenario. .

In the last weblog I had demonstrated the creation of “Test Data Container” . . eCATT: Creating & Executing Test Configurations Creation of Test Configuration In my previous weblogs on eCATT we were discussing “Creation of Test Case for the Sales Order Scenario” . : Creating Test Configuration .4. Transaction ‘SECATT’ . The only step left for the completion of Test Case for the above said scenario is the creation of “Test Configuration “. I will explain creation of “Test Configuration” with the help of Screen Shots .

.In the Test Configuration ( zsales_config ) Test data “ZSALES_DATA”( Created in last Weblog ) is attached . Now we have to copy variants from Test Data Container to the Test Configuration . Note : The field Target System is Blank as Testing will be performed Locally .

Executing Test Configuration : zsales _config . .The above screen shows the three variants namely : · ECATTDEFAULT · VAR1 · VAR3 Now the execution of this Test Configuration will Test the Sales Order Process with three different set of data .

The Log Generated after ZSALES_CONFIG was executed . From the above Test Scenario we were able to infer that Standard Sales Order type OR cannot be created in Distribution channel 16 . I will discuss Creation of Test Case for “WebDynpro” applications . The Log reveals that variant ECATTDEFAULT AND VAR1 executed successfully ( i.e sales order creation was possible with these set of Data ) But with Variant VAR3 Error : Order type OR not defined in Sales Area<1000 16 00 occurs . . Thus we have successfully created a Test Case for the Sales Order Scenario . In my next weblog on eCATT .Now .

This Weblog will go a step further and discuss how to create a Test Case for a Web DynPro Application. This is one of the major features of eCATT that allows users to test business processes that cross system boundaries.5. Tcode : SM59 RFC Destination : WEBDYNPRO2 . 4. I discussed topics starting from "Introduction to eCATT" to "Executing a Test Case using eCATT ". eCATT: Creating a Test Case for a Web Dynpro Application This Weblog will discuss how to create a Test Case for a Web DynPro Application. This is one of the major features of eCATT that allows users to test business processes that cross system boundaries. The goal is to create a Test Case for a Web Dynpro Application that is on java Stack . The url is : http://<server>:<port>/webdynpro/dispatcher/local/PO/CreatePO Procedure: The first step towards creating a Test Case for a Web Dynpro Application is to create a RFC destination in SAP . Type : G . 3. 2. The scenario for Test is as follows : Scenario 1. The application is for Purchase Order Creation. In my previous Welogs on eCATT . The application will be tested for different set of data .

Target Host : <server> Service : <port> Now . Tcode : SECATT After creation of Test Data Container . Create Test Script . create a System data Container assigning HTTP RFC destination created above . ( the creation of the same has been discussed at length in my previous weblogs ) .

The Application in our case is “/webdynpro/dispatcher/local/PO/CreatePO” Recording starts .In pattern option under UI control Group select WEBDYNPRO command . . Entering System data Container and Target System . The application starts in the browser .

Adding item details . .Entering appropriate Header Info in the fields .

Creating Purchase Order . Now . The PO is created in SAP and the PO number is reflected in top right corner . . click “Stop Recording” Option .

Below we can see a WEBDYNPRO command is created for each page of application. Now Parameterize the Input values .

.Creating Test Data Container . 2 Variants for are created . For Test Variant 1 : Company Code is 1000. For Test Variant 2 : Company Code is 3000. The Company code data is different in both cases .

. Executing Test Configuration .Now Creating Test Configuration and attaching Test Data Container .

Examining Log we see that : PO can be created with var1 ( Company Code :1000 ) PO cannot be created with var2 ( Company Code :3000 ) Thus we were able to successfully Create a Test Case for a "Web Dynpro Application" deployed on Java Stack using eCATT. .

6. Choose Display 2. Follow the instruction below Execute transaction SCC4 SAP R/3 Menu : Tools -> Administration -> Administration -> Client Administration -> Client Maintenance Then carry out the following steps: 1. Here. 6. 5. we will name it . Confirm the warning message Caution: The table is cross client. Now lets start with creating ecatt On the eCATT (tcode -SECATT) initial screen. select the Test Script radio button and enter a name for your new test script in the field beside it. Procedure to create eCATT script Make sure the client setting is changed to allow ecatt. 4. 3. activate the following settings: • eCATT and CATT allowed. Go back to the SAP Easy Access menu. Select your SAP R/3 client and choose Details. Save. In the Change View Clients: Details screen.

SU01 BC-SEC TUTORIAL (optional) Leave the Target System field empty.ZCREATE_USER. as shown above. Choose the Create Object icon. enter the following information: Field Title Component System Data Container Entry Create user . Leave the remaining fields empty. On the Attributes tab. . We will not use this field in this tutorial. to open the editor for the test script.

On the insert Statement window fill in as below Field Group Command Transaction Entry All Commands TCD (Record) SU01 This will start recording and take you to the user create screen and continue the user creation. .Switch to editor tab and click on pattern. In our example a userid (ZTEST_97) is created with Z:TESTROLE. Save the user and hit the back button. This will end the recording and you will we asked to save the recording. Click Yes.

Save the Object as local object. Go back and switch to change mode Click on the button shown below .

Select SU01_1 and click on the button shown below Highlight Dynpro and click on the button shown below This will switch to simualation mode and we have to parameterize. User id . Look at the video Hit the back button and save the script. We paramerterized. Create Test Configuation Select Test configuation from the initial screen as shown below . password and role.

Fill the Attributes as below Fill in the Configuration tab as below Fill in the variat tab as below save as local object. .

Open it in a excel and add data. Save it as txt file.Download the variant as show below. Run SECATT and select Test configuration and hit execute Select variant tab and select the row as show below .

Do not choose Enter. The system runs Transaction SU01. Choose Test Case → Record Transaction. . Enter the user’s title first name ZEBRA and the last name TEST. call Transaction SCAT and enter test case Zuser_creat. Writing a CAT script to create user 1 Recording a test case 1. 7. Enter the user name TESTZ and choose Create.and choose the file you edit with excel as shown below and hit execute. If you have any issue running this ecatt let us know. Check the result. and choose Record/Enter. Enter Transaction SU01.1 To record a test case.

Choose Next screen and double-click the last name. and choose Execute. go back. Do not change the default values. . in the test case. In the field Param. Note: When you use this method. and save the text file To execute the test case using the external variant from file. Creating and using an external variant for the test case 3.) Double-click on the user name field. 2 Entering parameters for a test case 2. enter $TMP. enter BC-SEC-USR. name. and choose Open. In the field package class. and choose Save.txt. (first appearance of this program) The first screen of Transaction SU01 is displayed. (If you backed out. Enter the test case title User maintenance. A message is displayed stating that the recording has ended.2 3. Open the file. Go back a screen and In the dialog box displayed. Enter the test case name Zuser_creat. Note: The default file name is <the name of your test case>. Choose Save to save the attributes. enter an "&" and choose Copy/Enter. enter the procedure name again and double-click on TCD. Under Processing mode. select External from file and choose Choose. enter the test case name and choose Execute. profile select sap_all then choose Save.1 3.Select the Logon data tab. call Transaction SCAT. enter init as the initial password. Double-click on TCD. Select the file created above. and choose Copy/Enter. with excel and edit and add another couple of user. the file must be imported each time the test case is executed (file remains only on PC). In the field Variants.1 3 To define parameters for a test case.3 To export the default parameters into a frontend file. Select Functions and choose Change. select Goto → Variants → Export Default. enter an "&". Save the test case. name. select End recording. and repeat the password. In the field Component. Then double-click on program SAPLSUU5 screen 0050. Go back until the Save folder appears. In the field Param. select Errors. To save the test case functions. from the initial CATT screen.

Sign up to vote on this title
UsefulNot useful