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

Recorded tests with generated relative URIs

3 Answers 74 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Inception
Top achievements
Rank 1
Veteran
Inception asked on 31 Jan 2012, 12:30 PM
Is it possible to configure the Test Studio VS plugin to record relative URIs only? To elaborate a bit more, I have read the article http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/knowledge-base/test-execution/using-baseurl.aspx on how to change URIs from absolute ones to relative ones. I'm using ^ instead ~ of because element inspection doesn't seem to like ~. I have set up my BaseURL in user settings for quick execution and in the test settings files for 'normal' test runs. All in all I can run my tests against different servers by changing the BaseUrl only. My problem though is that it requires a lot of manual tweeking of the generated elements. Right now I have to change the BaseURL for the FrameInfo elements, set UsesBaseUrlHost to true. In a larger project the number of elements can grow quite large and manually having to change them is quite annoying and prone to errors. 

3 Answers, 1 is accepted

Sort by
0
Anthony
Telerik team
answered on 31 Jan 2012, 05:24 PM
Hello Ron,

Please see the following excerpt taken from our article on How the Element Repository Works:

During test execution, the root Page node is not actually used to locate the element. The execution engine only uses the Frame, Silverlight nodes, and the element's Find Expression to locate the correct element to interact with during any test step. This allows the test to continue to work when you need to test in a different testing environment (e.g. a Development server, then a Staging server, then a Production server).

Since your application uses Frames, and as you've discovered, Test Studio must locate the Frame first and then its child elements. Unfortunately you've hit on a limitation where there is no global project setting to set UseBaseUrlHost to True by default. You should not need to alter the elements themselves however, just the Frame nodes. Although cumbersome to change at first, the maintenance should be low moving forward as newly recorded elements are nested under the already changed Frame node.

Kind regards,
Anthony
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Inception
Top achievements
Rank 1
Veteran
answered on 31 Jan 2012, 05:52 PM
Would adding support for this be a good idea? At least for our project it would be very helpful since we are using a lot of frames. Maintaining these is indeed cumbersome and error prone.
0
Anthony
Telerik team
answered on 01 Feb 2012, 05:58 PM
Hello Ron,

I agree and filed a feature request for it. You can track the PITS Issue here: Public URL.

Kind regards,
Anthony
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Inception
Top achievements
Rank 1
Veteran
Answers by
Anthony
Telerik team
Inception
Top achievements
Rank 1
Veteran
Share this question
or