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
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.
Byron
the Telerik team
Test Studio Trainings
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.
Byron
the Telerik team
Vote now
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
Vote now
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"
}
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
Vote now
Regards
regards
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
Vote now