In Part VII, creation of eCATT Scripts using Non-User Interface mode will be explained along with the details of Copy, Rename, Delete, Upload and Download of eCATT objects. In the subsequent Part, tips & l inks of eCATT will be covered.
Key Features Of Non-User Interface Recording Mode:
- The non-user interface can be used for testing back-end R/3-specific modules, such as function modules and BAPIs.
- It should be the preferred driver for interface tests in the mySAP environment.
- It is fast, efficient, and suitable for load testing.
Steps For Recording Using Non-User Interface Recording Mode:
- Transaction SECATT.
- Give the name of the Test Script(TS) in Test Script input box. The Version input by default is with value 1.
- In the Attributes ->General Data Tab, the value of the component will be BC-TWB-TST-ECA for eCATT.
- In the Attributes ->General Data Tab, the values of the SystemDataContainer should be given which contains all target systems with RFCs on which the script will be either executed or recorded & in the TargetSystem the name of target system (e.g. recording R/3 server) should be mentioned.
- Click on the Pattern (Ctrl+F6) button from the application toolbar.
- From the Command dropdown, select FUN. In the Function Module give the name of the function module/BAPI, which needs to be tested. Click on enter. The Interface name will automatically appear (E.g. Here BAPI_MATERIAL_SAVEDATA is used). Click on enter.
- Double click on the Command Interface (e.g. BAPI_MATERIAL_SAVEDATA_1) from this FUN syntax in the command editor. On the right side, the command interface will open in a window. The command interface will have all the IMPORT/EXPORT/TABLES/EXCEPTIONS parameter of the given function module/BAPI.
- Under the IMPORTING/EXPORTING/TABLES/EXCEPTIONS node, all the import parameters, export parameters, tables & the exceptions belonging to that function module/BAPI are present. These parameters can be parameterized.
If the function module or BAPIs are called in the ABAP Program then the way the values are passed to those parameters, similar ways values will be passed here in terms of Parameterization. The declaration of these parameters will happen at the Parameter List as either Import/Export/variable.
The output message variables, like the other recording modes, can be captured from the Exporting node.
- All the parameters needed for the execution of the function module/BAPI will be declared in parameter list and then parameterized.
- In the current example, BAPI is used for Material create and saving this data. Before this a unique material number is generated by system using another BAPI. This is written in ABAP-ENDABAP block. After the number is generated, this newly generated number is assigned to a variable. As import and export parameters cannot be used in inline ABAP code. So the variable is used. This variable is then passed as import parameter to BAPI, which is to be tested via this recording.
- Once the parameterization is done. The script is ready for execution. There is no specific Start Options mode available for Non-User Interface mode at execution time. It always executes in Background mode.
- If the recording is error free, then success log will appear. And if there is any error in recording of the transaction and its replay then error log with details will appear.
- Analyze the generated log (weblog Part VI). Following is the log generated for the example mentioned here. It shows Import, Export parameter along with the execution mode and time taken for each of the individual step and complete execution.
- Inline ABAP code is also shown in the log. It shows the results also.
- The function module/BAPI is also shown in log. The Importing/Exporting parameters along with the message generated.
- After the confirmation of error free recording, one can go ahead with the preparation of TD, TC for the TS.
- In SECATT transaction using Test Data (TD), variants can be prepared for the recorded test script. In the Parameters tab, add all the parameters from the test script. This will appear as ECATTDEFAULT in the Variants tab. Add multiple variants, as per requirement in the Variants tab. Test Data is independent of test script. Hence can be reused wherever required. (Weblog Part IV).
- In SECATT transaction using Test Configuration (TC), the TD & TS can be linked together on the Configuration tab. On the Variants tab, using Variant Maintenance Assistant required variants values from TD could be linked to TC. (Weblog Part IV).
- Finally the TC can be executed from SECATT directly by giving the required variant name at runtime. (Weblog Part IV).
- The TC is used in managing the scripts in plans/packages using SCAT transaction. (Weblog Part V).
How To Copy, Rename & Delete eCATT Objects:
- One can copy all the eCATT Object i.e. Test Configuration, Test Script with Version, Test Data & System Data.
- Transaction SECATT.
- Click on Copy Object (Ctrl+F5) icon from the application toolbar.
- Copy dialog box appears with the copy detail for the eCATT Object whose radio button was selected on SECATT.
- For Test Configuration copy, give the name of the new TC and click on Copy button. The new test configuration will be ready.
- Similar way, for Test Data and System Data, give the new names and click on Copy button.
System Data Copy-
- For copying Test Script, system gives one Version input field on Copy dialog box. If this field is left blank then all the versions are copied to new name. Otherwise only the specified version is copied.
- Rename eCATT Object: Similar to copying the eCATT objects, renaming can be done. On the application toolbar of SECATT transaction, click on Rename Object (Ctrl+F6) icon from the application toolbar.
Depending on the eCATT object selected, the Rename dialog box will appear. Give the new name and click on Rename button. The object will be renamed.
- Deletion Of eCATT Objects: Similar to Copying & Renaming, all the eCATT objects can be deleted. Click on Delete Object (Shift+F2) from the application toolbar of SECATT transaction.
There is no dependency on objects for deletion. Meaning deletion of TC won’t affect the TD & TS inside it. In case of Test Scripts deletion, to delete specific version mention it in the transaction. If the version field is left empty, all the versions are deleted. Similar way all the other eCATT objects can be deleted.
How To Download eCATT Objects:
- eCATT objects can be downloaded in XML & XSD format. These files can be further uploaded to any system. Hence the reuse of objects and their transfer amongst the R/3 system is facilitated. All the objects i.e. Test Script, Test Configuration, Test Data & System data can be downloaded via SECATT transaction. For a script to work successfully, the entire linked object should be present along with it like System Data, Test Configuration & multiple Test Data containers. This linking of objects can be known and the entire related object could be downloaded in one shot.
- Transaction SECATT.
- Give the name of Test Configuration or Test Script or Test Data or System Data, which needs to be downloaded.
- Menu Goto -> Reference List.
- One List Of Referenced Objects screen comes. Object Type & Object Name automatically appears depending on the selected eCATT object on SECATT screen.
- Click on Execute (F8) button from the application toolbar. List of referenced objects will appear.
- Click on Download All Objects (F5).
The files will be downloaded at the given destination in XML XSD format.
How To Upload eCATT Objects:
- eCATT objects i.e. Test Script, Test Data, Test Configuration as well as System Data can be uploaded via SECATT transaction from the XML, XSD files. The prerequisite is that both the XML & XSD files should be present in the same folder.
- Transaction SECATT.
- Menu eCATT Object -> Upload.
- Select Files For Upload dialog box appears. Select the file and click on Open button.
- Change eCATT objects to be uploaded window appear. Select the eCATT object, give the target object name if not present & click on Enter. The object will be uploaded and directly taken to SECATT window.
In case of Test Script, the Target Version (TV)
This way multiple objects can be uploaded.
System Data Container Upload/Download: