This is a migrated thread and some comments may be shown as answers.

How to manage menu and screen design changes

10 Answers 119 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Oscar
Top achievements
Rank 1
Oscar asked on 11 Jul 2012, 03:53 PM
Hello
Using test studio to test an ASPX app still under development.We have a couple hundred test already developed, however, as our app is still under development, sometimes a menu item is added, or some screen elements change place due to the addition of new elements.

Unless the new menu itmes are added BELOW the "tested" ones, the same for screen elements, all existing tests are broken.

Is there a smarter way to handle this or we need to rewrite all affected tests every time something changes?


10 Answers, 1 is accepted

Sort by
0
Byron
Telerik team
answered on 11 Jul 2012, 09:40 PM
Hello Oscar,

The best practice for allowing efficient test maintenance is to use a unique ID for all automation targets. This prevents tests from failing when elements move or are renamed. Test Studio uses IDs as the primary find logic by default, so new tests will automatically reflect this identification strategy. However, you will need to either re-record old tests or update their find logic to use the unique ID.

Please let us know if we can assist you further.

Kind regards,
Byron
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Oscar
Top achievements
Rank 1
answered on 25 Sep 2012, 08:42 PM
Hello, how do I apply the suggestion (unique IDs) to a RadMenu with an horizontal menu and several nested submenus? I cannot find any "Ids" and I do not want to use the menu text, as it can change when changing languages. I cannot find a reliable solution to identify and click menu (or submenu) items. Should I put an ID hidden in each menú item? If so, how?
0
Accepted
Byron
Telerik team
answered on 28 Sep 2012, 07:10 PM
Hi Oscar,

If menu list sequence changes, the default find logic may break (since it uses list item sequence in the absence of a unique ID). You can use a chained find expression (as demonstrated in our find element article) to find an element whose content remains fixed. The most reliable method of creating a chained find expression is to edit the find logic for the target element using the Edit Element option of the context menu for the element, and using the down arrow to create a subset of rules beneath the existing ruleset. The top ruleset will find one element, the rule beneath will look for an element beneath that element, and so on; the lowest ruleset defines the target element.

However, if the text content itself changes, you may need to use a data-driven find expression to iterate through different localized versions of the application, using a column from a data source containing the text content for different localities. Please let us know if we can assist you further.

Regards,
Byron
the Telerik team
Are you enjoying Test Studio? We’d appreciate your vote in the ATI automation awards.
Vote now
0
Oscar
Top achievements
Rank 1
answered on 12 Oct 2012, 01:03 PM
I tried to solve this problem adding a custom attribute "testID" with a unique id to each menú item. However TestStudio does not "see" this custom atribute. I cannot get the other solutions you suggested to work reliably, I get lots of errors very often, just because menu items are not identified correctly. Is there any way to make TestStudio "see" custom menu attributes"? If instead I use ToolTipText, will these be easier to work with from TestStudio, or will I have the same issues?
0
Byron
Telerik team
answered on 16 Oct 2012, 10:29 PM
Hello Oscar,

I'm sorry you're encountering issues implementing these approaches. Although Test Studio will not recognize custom attributes in its default find logic, you can find logic filters against them in the Find Element dialog; they should appear in the filter suggestions list to the left. Please find a screenshot attached. Please let us know if we can assist you further.

Regards,
Byron
the Telerik team
Are you enjoying Test Studio? We’d appreciate your vote in the ATI automation awards.
Vote now
0
Oscar
Top achievements
Rank 1
answered on 19 Oct 2012, 12:51 PM
Hi, the problem is, I cannot get the custom attributes to show in the suggestions window, does this work in cascaded menus? Pls see attached files, one of them shows the suggestions dialog, the other the associated menu.
I could give you the URL and login data so you can try it against our site.
If I look at the source code in the browser , I see the testID tags:
$create(Telerik.Web.UI.RadMenu, {"_childListElementCssClass":null,"_skin":"Office2007",
"attributes":{},"clientStateFieldID":"ctl00_Menu_ClientState","collapseAnimation":"{\"duration\":450}",
"expandAnimation":"{\"duration\":450}","itemData":[{"attributes":{"testID":"1"},
"navigateUrl":"~/Inicio/Ini/Primera.aspx"},{"attributes":{"testID":"2"},
"items":[{"attributes":{"testID":"2.3"},"navigateUrl":"~/Sistema/Otros/Rmanper.aspx"},
{
"attributes":{"testID":"2.4"}

0
Byron
Telerik team
answered on 24 Oct 2012, 02:18 PM
Hello Oscar,

In order to help with your issue, we will need more information about your test scenario. Please provide us with a copy of your test and access to your application. A Jing video demonstrating the issue may also help us to better understand what is happening. Thanks for providing this additional information.

Greetings,
Byron
the Telerik team
Are you enjoying Test Studio? We’d appreciate your vote in the ATI automation awards.
Vote now
0
Oscar
Top achievements
Rank 1
answered on 25 Oct 2012, 05:43 PM
Hello,  pls give me and e-mail adress to send the credentials so you can access the app and a .rar file containing the video and tests
Regards
0
Oscar
Top achievements
Rank 1
answered on 29 Oct 2012, 07:02 PM
Hello, I need an e-mail to send you the data
regards
0
Byron
Telerik team
answered on 30 Oct 2012, 02:58 PM
Hello Oscar,

Please create a Test Studio support ticket and reference this forum post to provide us private files and links.

Kind regards,
Byron
the Telerik team
Are you enjoying Test Studio? We’d appreciate your vote in the ATI automation awards.
Vote now
Tags
General Discussions
Asked by
Oscar
Top achievements
Rank 1
Answers by
Byron
Telerik team
Oscar
Top achievements
Rank 1
Share this question
or