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

Base URL Testing

4 Answers 194 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
LEONARD
Top achievements
Rank 1
LEONARD asked on 13 May 2013, 10:39 PM
Currently I am maintaining 3 different Test Lists that are are the same except for the enviroment they are meant to test. one is qa, one stage and the final is Prod.  Our URLs vary depending on the enviroment we are trying to access. I have investigated using the BASE URL function when a base URL is entered I get the "/" in my navigation step however when I try to modify the navigation URL for playback my test fails.  I believe this is due to the parameters before the base URL being the one I need to change not the ones after the URL.

Example: 
1. Movies.com is my base URL 
2. I want to hit a page of my site hollywood.movies.com 

The paremeters change before the base.  After watching the video here: http://tv.telerik.com/watch/automated-testing-tools/setting-base-url-in-webui-test-studio  it looks like base URL can only handle parameters after the base.   Has anyone run into this issue before or is there a known workaround that I am not finding.

Most of the sites I test have similar URL structures which will make maintenance of my test plans cumbersome. 


               

4 Answers, 1 is accepted

Sort by
0
Rodney
Telerik team
answered on 16 May 2013, 10:39 PM
Hi Robert,

Thank you Robert for providing that information. As Robert stated, there is an active feature request for this issue. You can vote for its inclusion in future releases at this link:
Public URL

Leonard, if you would like to create a support ticket, and attach a demo project that includes an example of all the components in your work scenario, I will be happy to take a look at it to see if there is anything else we can do. If there are any useful details, I can update the thread so that everyone benefits.


Kind Regards,
Rodney
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Bob
Top achievements
Rank 1
answered on 17 May 2013, 02:32 PM
Leonard.

I'm running the same test lists in every environment. I've written up a test that allows you to emulate the "BaseURL" property to work around this issue for now. You'll need to modify Step 2 in this test before running the test list to contain whatever prefix you want to add to the URL.

\\

Generate a Variable Prefix:
1) Navigate to - http://www.google.com/
2) Enter Text "" into Search Field (This is where you enter the prefix to your URL. Example: Hollywood)
3) Extract input Search Field into DataBind $(prefix)

Navigate to Site with Prefix - Coded Step - Use for every navigation step - I have my URL navigations in subtests
' Turn the extracted DataBind into a variable
Dim urlPrefix As Object = GetExtractedValue("prefix")
' Navigate to http:// <prefix variable> .movies.com
ActiveBrowser.NavigateTo("http://" & urlPrefix & ".movies.com", true)

\\

Alternatively, if you want to run your test against a group of environments, you could DataBind a spreadsheet with each subdomain in a single column, though if you go with this method, you'll need to copy your "BaseURL" test steps into every test because of the way Test Studio executes DataBindings of Subtests (should be a feature: option to run a subtest with DataBinds from the parent test so that the steps can be duplicated within the same test or used in other tests)
0
LEONARD
Top achievements
Rank 1
answered on 17 May 2013, 10:35 PM
Thanks Robert I will try your solution. 

I do employ a databind test which runs through most of my sites homepages it works like a charm when the enviroment is the same however our qa and staging site url format muddles with this so I would end up maintaining seperate spread sheets for all enviroments. That could however be a faster solution then changing test cases individually. 
Tags
General Discussions
Asked by
LEONARD
Top achievements
Rank 1
Answers by
Bob
Top achievements
Rank 1
Rodney
Telerik team
LEONARD
Top achievements
Rank 1
Share this question
or