Need More Info
Last Updated: 30 Mar 2021 09:35 by ADMIN
Richard
Created on: 26 Mar 2021 15:21
Type: Feature Request
0
Persistent element names (Element Repository)

Hello,

After using Telerik Test Studio for a couple of yeas I have found a persistent problem.  I have found myself renaming some objects in the Elements Repository because the auto-generated names didn't make any sense when they are used in coded step.  The Element Repository engine that is responsible for maintaining optimizing the elements often consolidates pages and elements often causes some element objects to go "missing" because it has renamed these items back to some auto-generated form in most cases.  Some cases I've had them disappear altogether because of our changing page definitions.  I have still been trying to find what is the best way to implement pages within our given test environments.

The Step Builder and the Element repository optimizer is great for those who are less technically inclined (e.g. BQAs).  However, I would like to request a mechanism for maintaining persistent names within the Element Repository.  This is mainly because the loss of named elements used in coded steps.  I have found myself resorting to the use of the XPath property to reference said object in coded step so that they, at least, compile.

 

1 comment
ADMIN
Elena
Posted on: 30 Mar 2021 09:35

Hi Ruban,

I am sorry to know you are having difficulties with maintaining the elements in Test Studio and will be happy to assist you this topic. 

The behavior of elements, which you described, is related to how the Elements Repository is designed. Actually, the element's name is not the only reference used to distinguish the elements in project - the find expression is the other important aspect of element definition. The references in the recorded steps are being automatically updated in the case when the element is renamed or the find expression is changed. 

This, however, is not applicable for coded steps, which reference the elements from the repository. The coded actions are using the so called 'external reference' to the element and since these are no longer tied to a specific step, renaming the element will broke the coded step reference. 

Another possible scenario to get a missing element error is, when the Pages file is being generated based on part of the project (for example, in the case of remote test list execution via the Test Studio Scheduling) - in this case, if an element referenced in the coded steps, is not used in any other recorded step, there will be no definition for the coded step element, and the project will not be compiled successfully. 

As far as I understand you are using plenty of coded steps across your test project, so you may explore the options of defining the elements in code directly - that way these will be independent from the Elements Repository for the recorded steps and you will no longer have troubles with that. 

You can also extend the coded solution to a coded class file in the project (using standalone code file), which is accessible from all tests within and holds the global definitions required. 

Please, take the time to review these suggestions and let me know if these make sense for you and the difficulties you have encountered in between. In case you need to further discuss any of the listed topics here, I will appreciate, if you open a ticket for continuing the conversation. 

Otherwise, if your idea for a feature request has different aspect within the light of the information shared here, please, do not hesitate to elaborate on your thoughts. 

Thank you for your understanding and cooperation in advance.

Regards,
Elena
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Test Studio course! Check it out at https://learn.telerik.com/.