Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

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 Part IV chaining, parameterization, creation of Test Configuration, Test Data Container, and System Data Container are explained in detail. In Part V, the management of eCATT Scripts via Testworkbench is explained. In Part VI, the eCATT Logs is explained in detail. In Part VII, creation of eCATT Scripts using Non-User Interface mode is explained along with the details of Copy, Rename, Delete, Upload and Download of eCATT objects. In the Part VIII, tips & links of eCATT are covered.

In part IX, the checkpoints using eCATT will be covered.

What are Checkpoints in Testing:

Checkpoints are the values to be verified which confirms the successful testing. These Checkpoints will have always predefined values as per the business requirements and should match to the output results after testing. So Checkpoints are used for cross verification of the results of testing.

Why are Checkpoints needed in Automated Testing:

    • In case of manual testing, once the testing is done by the business analyst for the given scenario, the analyst will manually cross verify the value of the checkpoint either in the table or in some transaction.

    • This value might be coming from SPRO settings, which is placed in those tables or transactions as a result of execution of the testing scenario.

    • Once the checkpoint value is verified then only the testing is confirmed as successful. This process of verification is fine in case of manual testing but in case of automated testing, the checkpoints need to be part of automation.

    • If the checkpoint is not part of automated testing then the chances of having successful automated test result with incorrect checkpoint value increases & hence resulting in incorrect testing. As here the checkpoint needs to verify manually for the automated result set.

    • Hence the need of adding checkpoints in the automated testing is must to confirm the successful testing.

Advantages of Checkpoints in Automation:

0.1.

0.2. If the checkpoint will be as part of automation of test case then the manual error of cross verification is avoided.

0.3.

0.4. If the test scenario is automated but checkpoint is manual then the chances of missing the cross verification for the checkpoint is more. This happens mostly when the integration test happens and go live is about to happen with cut over activities on the head of business analyst. As lots of activities are needed to be done in less time, the checkpoint cross verification may be missed out.

0.5.

0.6. It will be done automatically. Hence time efficient.

0.7.

What is required if the Checkpoints should be added as a part of Test Automation:

0.1.

0.2. Checkpoints should be added as a part of manual script at the design time.

0.3.

0.4. Where the checkpoints will be verified for the given scenario should be clearly mentioned in the manual script. e.g. whether table value will be verified or any value in the transaction will be verified.

0.5.

0.6. At what stage in the complete test scenario, checkpoints should be verified should also be mentioned very clearly in manual test script.

0.7.

0.8. The value of the checkpoints for the given scenario should be clearly given as input in the manual test script.

0.9.

What are commands in eCATT for Checkpoints:

0.1.

0.2. There are different eCATT commands are available, which can be used for verification of checkpoints as follows –

CHEGUI, CHETAB, CHEVAR, CHEATTR, CHESTATIC etc.

Details about checkpoint commands in eCATT:

0.1.

Most frequently used commands for checkpoints are CHEGUI, CHETAB, and CHEVAR.

0.2. CHEVAR command:

0.1.

0.2. CHEVAR command compares one parameter with other parameter or fixed value.

0.3.

0.4.

Syntax: CHEVAR (<parameter1> <comparison operator> <parameter2>).

         For comparison, the operators are =, <>, <, >, <=. >=. For complex expressions, the operators like AND, OR & NOT are available. 0.1.

0.2. CHEVAR command is useful when two values need to be compared. One value will be as an input for verification and the other one may be either input vale or fixed value or outcome from the execution of the business scenario as Export variable. Also this is useful when depending on some output value; the further steps need to be verified for execution.

0.3.

0.4. If this command fails at runtime, then error log is generated.

0.5.

0.6. Example:

0.1.

0.2.

Goto transaction SECATT.0.1.

0.2.

Give the name for a Test Script. Click on Create.0.1.

0.2.

Give the suitable Title & Component in the Attributes tab.0.1.

0.2. Record a transaction.

0.3.

0.4. Parameterize the fields of the transaction.

0.5.

0.6. Position the cursor in the eCATT editor after the transaction recording.

0.7.

0.8.

Now click on Pattern (Insert Statement CtrlF6)+ button from the application toolbar.

          

Select Params from the Group dropdown, CHEVAR from the Command dropdown. In the Condition, enter P_IV_NAME_FIRST = P_CV_FNAME and click on Enter.

          

!https://weblogs.sdn.sap.com/weblogs/images/37984/CheVAR.JPG|height=128|alt=image|width=405|src=https....

0.2. The CHEVAR command is inserted in to the command editor of eCATT.

0.3.

0.4.

Now, give the suitable values to input as well as checkpoint variable in the Parameter section.0.1.

0.2. Execute the script.

0.3.

0.4.

The log will be generated. Here the input value is different than the checkpoint value so the CHEVAR command should fail & hence the script.

          

!https://weblogs.sdn.sap.com/weblogs/images/37984/ErroLog.JPG|height=335|alt=image|width=519|src=http....

0.2. And if the correct value is passed to the checkpoint, success log is generated as follows -

0.3.

0.1.

0.2.

0.3. CHEGUI command:

0.1.

0.2. CHEGUI command is useful when the field value to be verified is present in any transaction.

0.3.

0.4. There are two ways of using the CHEGUI command, one is dynamically adding this command during record time in SAPGUI recording mode & other is manually in eCATT Editor. The first approach is very simple and should be followed for errorless recording.

0.5.

0.6.

If the transaction is not part of the business scenario then record this transaction in SAPGUI recording mode after the normal business scenario is recorded in the same script. And if in case the transaction, which contains the checkpoint to be verified is part of the given business scenario then make sure that at least transaction is getting recorded in SAPGUI mode. 0.1.

0.2. If this command fails at run time then error log is generated.

0.3.

0.4. Example:

0.1.

0.2.

Goto transaction SECATT.0.1.

0.2.

Give the name for a Test Script. Click on Create.0.1.

0.2.

Give the suitable Title & Component in the Attributes tab.0.1.

0.2.

Record a transaction in SAPGUI mode. For this click on Pattern (Insert Statement CtrlF6)+ button from the application toolbar.

          

Select All Commands from Group dropdown & SAPGUI Rec from Command dropdown. Click on Enter.0.1.

0.2.

Now from the Record SAP GUI Command popup, select the checkboxes for Automatic Generation & give the transaction name to be recorded. Click on Start Recording button.

          

!https://weblogs.sdn.sap.com/weblogs/images/37984/SAPGUIRecrd.JPG|height=219|alt=image|width=448|src=....

0.2.

On the Record SAP GUI Command popup, click on Yes to record the session.0.1.

0.2. On the +Record Running…+popup, click on Enter. This is the screen having Insert CHEGUI Command into, which we will utilize for checkpoint.

0.3.

0.4. Now start recording of the transaction on the session just behind the above popup. Record the transaction as per requirement. Now here while recording, wherever the checkpoint field comes on the screen, just bring the popup of +Recording Running…+ on this checkpoint screen. This popup remains till we stop the recording.

0.5.

0.6.

Now click on Insert CHEGUI Command from this popup & point towards the required field on the transaction.

          

The moment mouse is moved over on the screen, the area is highlighted. So go to the required field and click there once.

!https://weblogs.sdn.sap.com/weblogs/images/37984/cheguiintoscript.JPG|height=167|alt=image|width=353....

0.2.

The moment the checkpoint field is clicked, which got highlighted, another popup comes up Selection of Properties & Methods to Be Recorded. Expand the node Checks. And select all the checkboxes. Click on Insert & Exit at the bottom.

          

!https://weblogs.sdn.sap.com/weblogs/images/37984/GetVal.JPG|height=320|alt=image|width=318|src=https....

0.2. After this, just go to the recording of transaction and walk through the transaction as required. Come back till SAP Easy Access screen.

0.3.

0.4.

Once the recording is done, click on the Stop Recording... from the Recording Running... popup. This will get back the recorded script in Solution Manager.

          

!https://weblogs.sdn.sap.com/weblogs/images/37984/CHEGUICode.JPG|height=293|alt=image|width=396|src=h....

0.2.

Now parameterize the fields of the transaction along with the checkpoint. For checkpoint parameterization, double click on the interface name on the left side in the command editor. On the right side, expand the Text node. In the Expected Result, on the rightmost side, enter the name of the parameter. This is the parameter to which input values will be passed for verification of checkpoint.

          

!https://weblogs.sdn.sap.com/weblogs/images/37984/CHGUIParam.JPG|height=263|alt=image|width=479|src=h....

0.2.

Now give some input value to checkpoint parameter in the Parameter section and execute.Goto transaction SECATT.0.1.

0.2. Give the name for a Test Script. Click on Create.

0.3.

0.4.

Give the suitable Title & Component in the Attributes tab.0.1.

0.2. Record a transaction.

0.3.

0.4. Parameterize the fields of the transaction.

0.5.

0.6. Position the cursor in the eCATT editor after the transaction recording.

0.7.

0.8.

Now click on Pattern (Insert Statement CtrlF6)+ button from the application toolbar.

          

!https://weblogs.sdn.sap.com/weblogs/images/37984/Pattrn.JPG|height=89|alt=image|width=362|src=https:...!</body>

2 Comments