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 the Part III, the creation of eCATT Scripts using SAPGUI mode is explained in detail. In the subsequent Parts, Management of eCATT scripts via Test Workbench and other details of eCATT will be covered.
Steps Involved In Creation Of eCATT Test Scripts:
- Test script is generally series of steps (transactions) involving a business scenario. Identification of right transactions for this script, which prepares the input data for the script and also covers the planned business scenario, should be done.
- Recording of test script by selecting proper recording mode.
- Execution of test script immediately after recording without parameterization to confirm the errorless recording.
- Parameterization of the import, export & variable parameters.
- Preparing variants using Test Data Container.
- Linking Test Script (TS) & Test Data Container (TD) by Test Configuration (TC).
- Execution of TS using TC for different Variants.
How To Identify Any Transaction For SAPGUI Recording Mode:
- If the transaction runs under SAP GUI for Windows or SAP GUI for Java, it can be recorded by either TCD or SAP GUI mode.
- If the transaction doesnt have any activex controls then TCD recording mode should be used. Here SAPGUI mode can also work.
- If the transaction has activex controls and these controls ARE MANDATORY for the functionality of the transaction, then only SAPGUI mode can be used as recording mode.
Key Features Of SAPGUI Recording Mode:
- It is suitable for the transactions having activex controls, so it requires GUI playback mode.
- It is slow comparative to TCD recording mode.
- It is not suitable for load testing.
Steps For Recording Using SAPGUI 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.
- In the test script editor, choose the Editor tab.
- From the Application Toolbar, click on Record Test Script (Ctrl+F5).
- One window appears with title Record SAP GUI Command, select each check box of the Automatic Generation section. Click On Start Recording button.
- Login in to Target System from SAP Logon or either create a new session on target system.
- One window appears on the newly created session of target system as Record SAP GUI Command. Click on Yes for recording.
- One window with title Recording Running will appear. In the section of Record initial state for value check, select the Record with inactive checks radio button. Below the radio buttons, one table control with the record/ types for GUI elements is mentioned along with check boxes. Select all the check boxes. Select the check box of Closed Recorded GUIs and click finally the Continue (Enter) button. This recording window exists till recording ends. Lots of data of initial state for the mentioned screen element types will be generated. So one can be selective in selecting the checkboxes.
- Recording can be started with the transaction working as normal on the newly generated session.
- Once the transaction is complete with the functionality, from the Recording Running window, click on End Recording button. This will take the recorded details of the transaction to SECATT transaction in the test script editor.
- A SAPGUI command and its associated Command Interface will be inserted in test script editor of SECATT.
Execution of Recorded SAPGUI script:
- Once the recording of the transaction is done and the details of recording are taken back to the test script editor, script can be executed.
- First of all without parameterization the script should be executed to confirm the errorless recording. At the runtime, a Start Options window appears. Give the following values on this window:
- Error Behavior S No termination, continue with next script.
- System Data Name of the system data container, which contains the Target System.
- Target System Name of the server on which the execution will happen.
- Select the Log Display check box.
- In SAPGUI section of window, select following options:
- Procg Mode SAPGUI – S Synchronous GUI Control
- Error Mode for SAPGUI – C Continue (Continue on Any Error)
- Stop When – N Do Not Stop
- Close GUIs – R Close Generated Sessions After REF
- Click on Execute button.
- Transaction will start executing, by creating a new session. This requires GUI for playback.
- 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.
- After the confirmation of error free recording, one can go ahead with parameterization of the import, export & variables.
- 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.
- 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.
- Finally the TC can be executed from SECATT directly by giving the required variant name at runtime.
- The TC is used in managing the scripts in plans/packages using SCAT transaction.