? QA Design Gurus: TTS Tips: Moving elements in Element Repository from frame to its parent page

Feb 8, 2016

TTS Tips: Moving elements in Element Repository from frame to its parent page

In the current software industry, web applications have been changing drastically day by day. There is a possibility that the application has frames at initial stages of development and will be removed at later point of development. This poses unique set of challenges during test automation. 

TTS uses global Element Repository concept to store element objects. If the application has frames, the elements inside the frame will be stored in the hierarchy like Page Node --> Frame Node--> Element Node and the elements outside the frame will be stored in the hierarchy like Page Node--> Element Node. 


Element inside the frame:

 


Element outside the frame:

 

 


The TTS execution engine does not use the page node but it uses both frame node if exists, and element node during test execution. Hence, even though element identification logic is same, the test case which has written on old application will not work on new application after removing frames. Unfortunately, we don't have any way from TTS tool which we generally use to automate, to move the elements from frame to its parent page. TTS tool also doesn't allow to delete the element from Element Repository if it used in any one regular step. So the only way from the tool is, delete the corresponding regular step then delete element if it still exists in Element Repository. Now add the new element and corresponding regular step again. If there are one or two then it will be ok but if we have more such scenarios then it will be very tedious to QA to perform those many steps for each time.

One alternative way by which we can move the element from frame to its parent page node is, updating ".tstest" file. Yes, what you have listen is correct. By updating ".tstest" file we can move the element from frame to its parent page node without going to TTS tool UI and run the same test case without deleting and adding same regular step with new element like what I have mentioned above. I hope, you all know that when we create test from TTS tool , the corresponding ".tstest" file will be generated at a specified location. This ".tstest" file has auto generated code by TTS tool so we have to be very careful while updating this file. Updating this file is nothing but updating meta data that will be used by TTS tool to render test.

Below are the steps that needs to be performed on ".tstest" file to move the element from frame node to its parent page node.


1. Open '.tstest' file in Notepad/Notepad++.

2. Go to 'Steps' section. To go to this section search for '"Steps": { ' in '.tstest' file.


3. Go to the step that needs to be update. You can search with the test step description like 'Click on Data Source Groups'.




4. Go to elements section of that step and update Frame value with null.



Before update:

 

After update:

 

If there are minimal elements or test steps that needs to be changed then I will always suggest first approach.
 


No comments:

Post a Comment