P. 1
eCATT Chaining

eCATT Chaining

|Views: 59|Likes:
Published by kalidasm

More info:

Published by: kalidasm on Oct 19, 2010
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOCX, PDF, TXT or read online from Scribd
See more
See less






eCATT Chaining, Parameterization, Creation Of Test Data,Test Configuration, System Data (PART IV)

The Part I of eCATT Introduction gives the basic details about usage of eCATT & features involved. In Part II, the creation of eCATT scripts using TCD mode of recording is explained in detail. In Part III, SAPGUI recording mode of recording is explained in detail. In Part IV chaining, parameterization, creation of Test Configuration, Test Data Container, and System Data Container will be explained in detail and in subsequent parts the management of eCATT Scripts via Test workbench & other details of eCATT will be covered. What Are Parameters: Parameters are export, import interfaces or local variables of a script. Parameter name can be 30 char long. The first letter should be either an underscore or character. Their visibility within the script is same and outside it is of import parameter, export parameter or local variable. The visibility can be set from the parameters list.

ONLY local variables can be used in the inline ABAP block in the test script editor. Import & Export parameters CANNOT be used in the inline ABAP block. Import Parameters (IP): Import parameters are input values to the script. They are passed to the script during execution. They are locally available and test script version independent. Import parameters can hold default value also. Export Parameters (EP): Export parameters are outcome of the test script execution. The result value is passed into the export parameter when the test returns from the test module. They are test script version

or to receive export parameters from referred test cases or called function modules.2 independent. e. &SCRIPTVERSION. Local Variables (LV): Local variables are used in test scripts for calculations. &YEAR. are symbolized as follows ± Why Parameterization Is Needed: After recording of the transaction. automation can be parameterized. Different sets of data can be passed via parameters and the recorded script can be used again and again. &YEARB. &MSX. &MS2. &OPSYS. &VARID. which can also be used in command editor. &M04. &HOST. They are read-only and are available from SYST structure. &M02. &REFVERSION. &LOGID. &MST. &MS4. &REFLEVEL. Due to . &REFNAE. Due to parameterization. &CLIENT etc. &M01.g. Once the successful recording is confirmed. either fixed or parameterized or not define. &SYSTEM. &SAPRL. The status of values. &TIME. They are also used for passing values to and from inline ABAP blocks & are version-dependent that is. &USER. &MS3. input data will be checked and changed at Test Script level. &SCRIPTNAME. &MSG. System fields can also be used in command editor. &M03. &SUBRC. &MS1. This is very similar to concept of Constants in Program (Without parameterization) and using variables for those values (with parameterization). &DATE. &YEARA. There are special read-only eCATT variables. &DBSYS. Transaction can be checked without parameterization for errorless recording. &MSI. a local variable defined in one version is not automatically defined in another version. the recording becomes reusable. &MSN. &LPC. If parameterization is not done than before next execution of automated script. &LANGUAGE. &EXCEPTION.

Export parameters. and values in the input field can be assigned. Defining Import Parameters: y After step 3. Screen simulation can be used to edit and parameterize the fields. Fields having mode S (Set) under each dynpro of the command interface contain some value entered during the recording. Select the field value & click on Insert Import Parameter (F6) icon from the application toolbar. For parameterization. TCD Mode Parameterization: If a transaction is recorded via TCD mode. And recording becomes reusable. one can clear it. To delete the default values space characters ( ) can be passed via screen simulation. if the field has any value. Click on Screen Simulation icon of the command interface.3 this the errorless recording time data will be disturbed. field check. The system will prompt for the login of recording time target system. then the screens can be simulated via screen simulation. select the Dynpro whose fields need to be parameterized as Import/Export parameter. For parameterization. Give the login details. . Hence parameterization is necessary. Using Screen simulation Import parameters. Screen simulation icon is present in the command interface of the TCD mode. the screen simulation window will appear. This is the value one needs to parameterize as Import Parameter so that with next run a new set of data will be passed to the recording.

Export parameter are necessary for chaining of transactions wherein output of one transaction becomes input for other transaction. Select the field and click on the Read field value (Ctrl+Shift+F3) icon from the application toolbar. Here export parameters can be linked between the two transactions interacting. y Read field value window appears. Press enter. The parameter will be inserted into the parameter list. Click on Back (F3) button of the standard toolbar. Follow step 3. After step 3. Fields having G (Get) as mode are assigned to export parameters. Name needs to be given. Give the . This way one can parameterize all the import values. The field with the technical name appears against which the Param. Give the parameter name & default value in the Field contents there. Last dynpro in the dynpro list just before the MSG node in the command interface contains the output messages and other outcomes. the screen simulation window will appear. Defining Export Parameters: y y y The output results of the transaction are assigned to export parameters. Export parameters can be assigned for these values.4 y One Maintain field entry window appears for the selected field with its technical name.

Select the field. Click on enter. If the field has already some value. Click on Back (F3) button from the standard toolbar. . Maintain field check dialog box appears. Click on enter. screen simulation window appears. These values are present under the Processed Screen node of the SAPGUI command interface for the given screen. Click on the Check field (Ctrl+Shift+F2) icon from the application toolbar. Automatically the name will be included in the Parameters list. Click on Back (F3) button from the standard toolbar. it will be created automatically as import parameter in the parameter list.5 name of the export parameter. Name. Defining Field Checks: One can check whether the runtime value of a field is the expected value or not. SAPGUI Mode Parameterization: Defining Import Parameters: Import parameters are defined for the input values given during the recording of the transaction. If it doesn¶t exist. The check value can be a constant or a parameter value. Give the name of the variable in the Param. After step 3. Give the value against this field. clear the value of the field. Follow step 3. This way one can parameterize all the export values.

Under the Processed Screen -> UserChangedState node select the State node of the field.6 Double click on the command interface of SAPGUI command from the test script editor from the left side. This way multiple import parameters can be assigned & created. Double click on the field number. Export parameter of first transaction becomes the import parameter in chaining. Export parameters are assigned to result of transaction. which needs to be parameterized. Material Created out of MM01 transaction. . Define this import parameter in the parameter list with the type of the field & assign the default value. i. From the Command dropdown. So the results are captured from Message node under the Processed Screen node using MESSAGEENDMESSAGE command.e. On the rightmost section. Defining Export Parameters: Export parameters are used to link transactions while chaining. The Interface name is automatically populated by system. On right side the command interface will open. assign the Import parameter to Value field.g. Click on Pattern (Ctrl+F6) button from the application toolbar. e. select the MESSGAE MESSAGE END MESSAGE option. Click on enter.

After that assign the respective message parameter to the export parameter. value from one screen can be passed to the subsequent screen. system generated value for an input field on one screen can be passed to subsequent screen. This way multiple export parameters can be declared. This can be achieved by assigning an Export Parameter to the .g. Place this block around the SAPGUI command from which the export value will be captured. The message variable number can be confirmed from the command interface from the right side. Declare this export parameter in the parameter list. Passing Values To Subsequent Screen: In SAPGUI mode.7 The MESSAGE-ENDMESSAGE for interface MSG_1 will be inserted into the test script editor. E.

And it can be passed further in same recording to subsequent screens as import parameter. On the right side. the value will exist. Chaining Of Scripts: Test case is a series of steps (transactions) involving one business . Double click on interface from the SAPGUI command in which the parameter to be captured exists. the command interface will open. double click on the number. Declare this export parameter in the parameter list. Make sure that the Check. write the Export Parameter name. On the right side. There in Value. Under the State node of the GuiElement. is blank instead of X . Name & Value will appear. Under the Processed Screen -> Initial State node.8 required value. And then passing this export parameter as input (import parameters) to subsequent screens. of the topmost GuiElement branch under which the GuiElement exists which needs to capture. in test script editor. which is to be captured. which appears in square braces.

Double click on importing node. These Importing and Exporting node have import and export parameters. On the rightmost side. Double click on the Command Interface of the inserted REF statement in the test script editor. while creation of that script. The Interface name will be automatically populated. Each step is automated and then linked together via chaining so as to complete the business scenario.9 scenario. which is outcome of first transaction. Both the scripts should be parameterized as well. Press Enter. which needs to be linked. Click on Pattern (Ctrl+F6) button from the application toolbar. all the import parameters appear under the Element column. The export parameter. which were assigned. One Insert Statement dialog box will appear. Press Enter. Chaining mainly involves the linking of script by import & export parameters. create a new script. For creating chaining of the scripts. The REF command will be inserted into the test script editor.g. Transaction SECATT. From the Command dropdown. VA01 output of sales order can be given as input to VA02. . select REF command. which are related in a way that output of one script becomes input to other. E. On the right side the interface will open with the Importing/Exporting nodes. In the Test Script. is passed as import parameter to second transaction and so on. give the name of test script. Create two test scripts.

The import parameter of chained script is assigned to the respective Importing node element. Assign the import parameters and variables to the Importing as well as Exporting nodes respectively. The export of one test script will be assigned as import of the next script using variables. which were created during the script creation are displayed. Similar ways include other test scripts also using REF command. . Declare the variables and assign them to the export parameters.10 Declare all import parameters in the Parameter section above and assign then in Value column below against the Import parameters. On the right side the export parameters. Double click on Exporting node of the command interface.

Connection Type. Creation Of System Data Container (SD): System data container contains the list of the target servers. The parameter list of this chained script contains only the import parameters as well as the variables. Creation of RFC for target system: RFC destination will be created for the target systems. TD and TC can be prepared. create a RFC destination for R/3 system. . By giving the default values in the import parameters. Give the necessary details like RFC Destination. Description. Using SM59 on source system (where eCATT scripts will be available). Click on Save (Ctrl+S) button from the standard toolbar. Target systems with their RFCs are mentioned in the SD. which will be used as recording time and/or execution time systems for eCATT scripts. which can be used at the recording time and/or at execution time. execute the script and ensure the correctness of chaining.11 This ways multiple transactions can be linked together in the final chained script. Once the successful execution of the chained script is confirmed.

12 In Logon/Security tab. login window will be prompted when target system is referred via RFC. recommended is to mention the Trusted system No . give the Title (mandatory) for the SD. In the System Data input field give the name of SD. For SD creation. Click on Create Object (F5) icon from the application toolbar. On the create screen. the server can be added to the SD list. target system NONE is already present. Under the System Data tab. in the Attribs tab. This ensures that every time. After RFC creation. Hence secure. transaction SECATT. .

give the name of the test data. Click on Save (Ctrl+S) button from the standard toolbar. Under the RFC Destination column. select the respective RFC for the target system. TD is independent of test script. In the Test System column. Variant values are also maintained in TD. give the name of the target server. Click on Save (Ctrl+S) icon from the standard toolbar. Transaction SECATT. Click on Create Object (F5) icon from the application toolbar. Add the lines to the required number of parameters. Under the Maintenance System. By this name the target system will be referred in eCATT. The parameters name & type must match to that of the script to which the TD will be linked. The Instance Description field is automatically filled by system. Variants created in TD are linked in Test Configuration. give Title (Mandatory) and Component (Mandatory). . click on Append Parameter icon and the new lines will be appended in the parameter list. On the create screen. under the Attributes -> General Data tab in the Header Data section. Creation Of Test Data Container (TD): Test data containers are used for creation of variants.13 Append a new row by clicking Append row icon from the toolbar. Hence once created can be used for multiple scripts. Under the Parameters tab. give the System Data Container as well as Target System. In the Test Data input field. This way multiple target systems can be added to the system data. Add the parameters. which is present in the SD.

Description & after that the parameters from the parameters list. the script can be checked for different sets of data using Variants of TC. TC is used in scripts management using Test Workbench in R/3 system. . To add new variants. This variant contains values from the Parameters under the Parameters tab. Add required number of variants this way. In turn these variant values are captured from TD. Under the Variants tab. click on Append Variant icon. one System Data container (SD) and can contain reference to multiple Test Data container (TD).14 To create variant. the column titles are Variant. without changing data at TS level. Creation Of Test Configuration (TC): Test Configuration contains reference to one Test Script (TS). ECATTDEFAULT variant will be present as default. One more Advantage of using TC is that for any given script. Hence the errorless recording time data is always maintained in TS. Give the details of new variant with values. Click on Save (Ctrl+S) button from the standard toolbar. minimum one parameter should be present in parameter list.

give the Title (Mandatory) & Component (Mandatory). Variants can be added from Variants tab. The Alias is an alphanumeric name up to three characters. For TC creation. Give the name of TC in Test Configuration and click on Create Object (F5) icon from the application toolbar. Also give the name of Test Script. The TC references the import part of the data interface of the test script. Under the Configuration tab. Multiple test data can be given if required. give the System Data Container. transaction SECATT. Test Data and an Alias can be added to Test Data section using Append Row icon.15 And the Last Changed script attribute (Attributes tab -> Extras tab -> Administration Data) will contain only the details of the person who has made changes to script and not to the data. On the create screen. Variants can be prepared . which contains the Target System.

The variant will be copied to Test Configuration side. To create variants from the Test Data containers. Select the variant from the Test Data & click on Attach as variant button. Scrolling between the multiple variants of Test Data is available. . Click on Save (Ctrl+S) button from the standard toolbar. This way multiple variants can be directly added to Variants list. click on the wizard icon (Variant Maintenance Assistant) under the Variants tab. The Variant Maintenance Assistant window appears. Manually Creating Variants: In the Test Configuration editor under Variants tab. The right half of the screen displays the variants belonging to the test configuration. Variants from Test Data Containers: Prerequisite for this option is that Test Data Containers should be maintained under Configuration tab. give the name of the variant.16 either manually by clicking the icons Append Variant/Insert Variants or from the wizard using test data containers referenced in the Configuration tab. In the Variants field. The left half of the screen displays the variants belonging to a test data container. This will insert a new line for variant under ECATTDEFAULT. Under each parameter either give value or leave the field blank. click on the Append Variant icon.

Linking multiple fields in Test Configuration column to a single field of Test Data variant: Select a field belonging to a test data container. and variant all refer to a test data container. The value in a field is determined by the following syntax: <parameter name>(<alias>. alias. alias. Variant will be added to Variants list in TC. . <variant>) where the parameter name.<variant>) where the parameter name. and variant all refer to a test data container. Click on enter. Choose Link individual field. All the empty fields in the column are filled.17 Only the parameters in the test data container that match those of the test script are appended. The links will be present for the values of the parameters from TC to TD. alias.<variant>) where the parameter name. Click on Save (Ctrl+S) icon from the standard toolbar. and variant all refer to a test data container. The field belonging to the test configuration is filled. Linking single field of Test Data variant to Test Configuration variant: Select a field belonging to a test data container. Select a field belonging to the test configuration. The value in a field is determined by the following syntax: <parameter name>(<alias>. Any changes done at TD side will be referred dynamically in TC. Click on enter. Choose Insert in column. The value in a field is determined by the following syntax: <parameter name>(<alias>. Click on enter. This way multiple variants can be created. And Test Configuration is now ready to execute or to link to TestWorkbench depending on the variant selected. The field will be dynamically linked. Select an empty field belonging to the test configuration.

18 .

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->