Recorded tests with generated relative URIs

4 posts, 0 answers
  1. Ron
    Ron avatar
    72 posts
    Member since:
    Oct 2010

    Posted 31 Jan 2012 Link to this post

    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. 
  2. Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 31 Jan 2012 Link to this post

    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
  3. Ron
    Ron avatar
    72 posts
    Member since:
    Oct 2010

    Posted 31 Jan 2012 Link to this post

    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.
  4. Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 01 Feb 2012 Link to this post

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