Professional Documents
Culture Documents
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
2
independent.
Local Variables (LV): Local variables are used in test scripts for
calculations, or to receive export parameters from referred test cases or
called function modules. They are also used for passing values to and
from inline ABAP blocks & are version-dependent – that is, a local
variable defined in one version is not automatically defined in another
version.
System fields can also be used in command editor. They are read-
only and are available from SYST structure.
There are special read-only eCATT variables, which can also be used
in command editor. e.g. &YEARB, &YEARA, &YEAR, &VARID, &USER,
&TIME, &SYSTEM, &SUBRC, &SCRIPTVERSION, &SCRIPTNAME, &SAPRL,
&REFVERSION, &REFNAE, &REFLEVEL, &OPSYS, &MSX, &MST, &MSN,
&MSI, &MSG, &MS4, &MS3, &MS2, &MS1, &M04, &M03, &M02, &M01,
&LPC, &LOGID, &LANGUAGE, &HOST, &EXCEPTION, &DBSYS, &DATE,
&CLIENT etc.
The status of values, either fixed or parameterized or not define, are
symbolized as follows –
level. Due to this the errorless recording time data will be disturbed.
Hence parameterization is necessary.
Fields having mode ‘S’ (Set) under each dynpro of the command
interface contain some value entered during the recording. 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. And recording
becomes reusable.
Give the login details. For parameterization, select the Dynpro
whose fields need to be parameterized as Import/Export parameter. Click
on Screen Simulation icon of the command interface. The system will
prompt for the login of recording time target system.
One Maintain field entry window appears for the selected field with
its technical name. Give the parameter name & default value in the
Field contents there. Press enter. The parameter will be inserted
into the parameter list. Click on Back (F3) button of the standard
toolbar.
Read field value window appears. The field with the technical name
appears against which the Param. Name needs to be given. Give the
5
Maintain field check dialog box appears. Give the name of the
variable in the Param. Name. If it doesn’t exist, it will be created
automatically as import parameter in the parameter list. Give the value
against this field. Click on enter. Click on Back (F3) button from the
standard toolbar.
Define this import parameter in the parameter list with the type of the
field & assign the default value.
Chaining Of Scripts:
Test case is a series of steps (transactions) involving one business
scenario. Each step is automated and then linked together via chaining so
as to complete the business scenario.
Chaining mainly involves the linking of script by import & export
parameters. The export parameter, which is outcome of first transaction,
is passed as import parameter to second transaction and so on.
Create two test scripts, which are related in a way that output of
one script becomes input to other. E.g. VA01 output of sales order can be
given as input to VA02. Both the scripts should be parameterized as well.
For creating chaining of the scripts, create a new script. Transaction
SECATT. Click on Pattern (Ctrl+F6) button from the application toolbar.
One Insert Statement dialog box will appear. From the Command
dropdown, select REF command. In the Test Script, give the name of test
script, which needs to be linked. Press Enter. The Interface name will be
automatically populated. Press Enter.
The REF command will be inserted into the test script editor.
Declare all import parameters in the Parameter section above and assign
then in Value column below against the Import parameters.
Similar ways include other test scripts also using REF command.
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.
On the create screen, in the Attribs tab, give the Title (mandatory)
for the SD.
13
Under the System Data tab, target system NONE is already present.
Append a new row by clicking Append row icon from the toolbar. In the
Test System column, give the name of the target server. By this name
the target system will be referred in eCATT. Under the RFC Destination
column, select the respective RFC for the target system. The Instance
Description field is automatically filled by system. Click on Save (Ctrl+S)
icon from the standard toolbar.
This way multiple target systems can be added to the system data.
Creation Of Test Data Container (TD):
Test data containers are used for creation of variants. Variant values
are also maintained in TD. Variants created in TD are linked in Test
Configuration. TD is independent of test script. Hence once created can
be used for multiple scripts.
Transaction SECATT.
In the Test Data input field, give the name of the test data. Click on
Create Object (F5) icon from the application toolbar.
On the create screen, under the Attributes -> General Data tab in the
Header Data section, give Title (Mandatory) and Component (Mandatory).
Under the Maintenance System, give the System Data Container as well
as Target System, which is present in the SD.
14
Under the Parameters tab, click on Append Parameter icon and the
new lines will be appended in the parameter list. Add the lines to the
required number of parameters. Add the parameters. The parameters
name & type must match to that of the script to which the TD will be
linked. Click on Save (Ctrl+S) button from the standard toolbar.
To add new variants, click on Append Variant icon. Give the details
of new variant with values. Add required number of variants this way.
Click on Save (Ctrl+S) button from the standard toolbar.
Under the Configuration tab, give the System Data Container, which
contains the Target System. Also give the name of Test Script. Test Data
and an Alias can be added to Test Data section using Append Row icon.
The Alias is an alphanumeric name up to three characters. Multiple test
data can be given if required.
16
In the Variants field, give the name of the variant. Under each
parameter either give value or leave the field blank. Click on Save
(Ctrl+S) button from the standard toolbar.
Only the parameters in the test data container that match those of
the test script are appended. The value in a field is determined by the
following syntax: <parameter name>(<alias>, <variant>) where the
parameter name, alias, and variant all refer to a test data container.
Click on enter. Variant will be added to Variants list in TC. The links
will be present for the values of the parameters from TC to TD. Any
changes done at TD side will be referred dynamically in TC. This way
multiple variants can be created.
Linking single field of Test Data variant to Test Configuration
variant: Select a field belonging to a test data container. Select an empty
field belonging to the test configuration. Choose Link individual field. The
field belonging to the test configuration is filled. The value in a field is
determined by the following syntax: <parameter
name>(<alias>,<variant>) where the parameter name, alias, and variant
all refer to a test data container. Click on enter. The field will be
dynamically linked.
18
Click on Save (Ctrl+S) icon from the standard toolbar. And Test
Configuration is now ready to execute or to link to TestWorkbench
depending on the variant selected.