How to manage menu and screen design changes

11 posts, 1 answers
  1. Oscar
    Oscar avatar
    21 posts
    Member since:
    Sep 2008

    Posted 11 Jul 2012 Link to this post

    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?


  2. Byron
    Admin
    Byron avatar
    184 posts

    Posted 11 Jul 2012 Link to this post

    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
  3. Oscar
    Oscar avatar
    21 posts
    Member since:
    Sep 2008

    Posted 25 Sep 2012 Link to this post

    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?
  4. Answer
    Byron
    Admin
    Byron avatar
    184 posts

    Posted 28 Sep 2012 Link to this post

    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
  5. Oscar
    Oscar avatar
    21 posts
    Member since:
    Sep 2008

    Posted 12 Oct 2012 Link to this post

    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?
  6. Byron
    Admin
    Byron avatar
    184 posts

    Posted 16 Oct 2012 Link to this post

    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
  7. Oscar
    Oscar avatar
    21 posts
    Member since:
    Sep 2008

    Posted 19 Oct 2012 Link to this post

    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"}

  8. Byron
    Admin
    Byron avatar
    184 posts

    Posted 24 Oct 2012 Link to this post

    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
  9. Oscar
    Oscar avatar
    21 posts
    Member since:
    Sep 2008

    Posted 25 Oct 2012 Link to this post

    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
  10. Oscar
    Oscar avatar
    21 posts
    Member since:
    Sep 2008

    Posted 29 Oct 2012 Link to this post

    Hello, I need an e-mail to send you the data
    regards
  11. Byron
    Admin
    Byron avatar
    184 posts

    Posted 30 Oct 2012 Link to this post

    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
Back to Top