In this blog let’s see how to automate tree structure to get a reliable Ecatt script
The motive of test automation is to save time by creating reliable and zero maintenance automations. However, when it comes to automating the tree structure it’s difficult to get reliable scripts.
Problem statement – Difficulty in automating the tree structure with the dynamic screen position through Ecatt.
Proposed Solution – Automation using Navigation tree code is the best solution for achieving reliable scripts which have tree structures. In order to automate, first the id needs to be identified. Once the id is known, a logic to be maintained to find the id on runtime with minimal effort and this id needs to be passed as code, which will perform the action. This automation approach results in the achievement of more reliable scripts.
We have implemented this approach in the SAP insurance Module for policy creation. To achieve that, the backend code of the R/3 screen which specifies the exact position of the structure was activated. The position was passed from the Transaction bar along with the functional approach which performed the exact function that was supposed to be done irrespective of position on the screen. The backend code would be the hierarchal way and this would be a unique code for each node and functionality
In the above example. the set of zeros are passed from test configuration. In order to fetch the functional command and the node name, all unique commands have been saved in one table in SE11 and alias were created for all with simple unique functional keywords. During the runtime through GETTAB the functional commands were fetched. Once the GETTAB runs and command is generated, the code needs to be merged and passed through the transaction bar. The whole code cannot be passed as one statement due to the size limitation of the transaction field. So, it needs to be split into three parts and should be passed.
The above picture states that the first 8 entries are given by Ecatt developer and the last two commands are generated through scripts. These two commands are concatenated to a meaningful system accepted string and then after the split it will be passed through the transaction bar and required functionality is achieved.
Conclusion – This Automation through the Navigation tree code will create a highly reliable reusable Ecatt script which will save the maintenance efforts of the automation developers. Testers can utilize this time by testing the application thoroughly.