Sunday, June 9, 2013

Using ECATT Scripts

Computer Aided Test Tools (CATTs) are used within the context of SAP Best Practices to create master data and to automate technically oriented activities such as connectivity. For example, you can use CATTs to create master data in all components of the system landscape in which example data is
needed. Or you can use them to automatically carry out activities to create initial technical settings, such as RFC connections.
SECATT is an SAP Testing Tool used to automate & test business scenarios in R/3. Each test generates a detailed log that documents the test process and results. SECATT enables automatic testing in SAP GUI for Windows and SAP GUI for Java.
Enable SECATT:
Set the Client to allow SECATT using Tcode SCC4 : select Client -> Change

Create Mass users using  SECATT 
In every SAP Implementation / Installations one of the major activity is User Administration, which includes from user creation, setting initial password, security etc.
Suppose if there is a requirement of says more than 500 users ID creation! Imagine the efforts using SU01.
My objective is creating mass user short time with less administrative efforts.
The extended Computer Aided Test Tool ( Tcode : SECATT ) will help us accomplish our goal in very short time .
In short in our case SECATT is a set of Test Script & Test Configuration.
Test Script: A script contains one or more recorded transactions.
Test Configuration (Enable SECATT): A test configuration is a persistent data object with a set of references to a test script, although you can execute test scripts alone.
Create the Script which includes recording of the transaction:
1 ) Tcode – SECATT , create new script ZSCRIPT_CREATE_MASS_USER

2) Enter the following inputs:Title: MASS USER CREATION SCRIPT
Component: BC-SEC (OR ANY) & save as local object.

3) Click on the “Pattern” button to insert statement

4) In next screen Select : Group: All Commands Command: TCD (Record)
Transaction: SU01 and Interface SU01_1 (or anything basically this is test identifier)

5) The next screen will record the activity of SU01 (take to user create screen (SU01) continue with the user creation) make sure that in our case we are specifying the UserID, Last Name, initial Password, Profile.
Do not select any other parameter apart from mention above.
6 ) At the end Transfer the recorded data into script .
7) Double Click on interface SU01_1 to initiate the Stimulation
8 )  Select  DYNPRO MODE PROG and click on Simulation as mentioned in screen
9) Insert the Param Name on mentioned field and follow the sequence of Simulation screen
a ) It will go SU01 screen which you filled previously (step 5).
b) Now you have to next screen using Next Screen Navigator.
c) Set Parameter Name for this screen.
d)
e)
Now you are in Last Screen. So Save the Simulation and here we finish the past of Script creation.
Now Script macro (recording ) is done.
Create Test Configuration , which will execute the script ZSCRIPT_CREATE_MASS_USER
a ) Follow the below mentioned c steps:
b)
c) Assign the script with the Test Configuration ZCONFIG_CREATE_MASS_USER (which previously recorded)
d) Save and execute the Test Configuration and follow the steps
e)
f) Crete Variant ZVARIENT (for Execute a record)
g) Fill the respective row with desire values. and Execute.
It will create this user.
You can also copy multiple variant from excel file, it will execute one by one,  but variant name should be different.
or you can download variant to your local system.
Download the Variant to Local desktop
Open the Variant file in Excel to modify / add user , now add the details of users in the file and save.
Specify the destination file ( Variant ) , click on the checkbox External Variable to enable the menu & execute
Now you are set to create mass users , next time just update the Variant file with required detail and execute theTest Configuration (ZCONFIG_CREATE_MASS_USER) .
You can also create templates  for Roles & Profiles using this procedure.

No comments:

Post a Comment