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

Correct Use of BaseURL

9 Answers 236 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Shelly
Top achievements
Rank 1
Shelly asked on 23 Feb 2011, 04:21 PM
I want to make sure I'm using the BaseURL function correctly before I spend a lot of time recording test scripts.  We have three main environments we'll want to hit when we execute tests.  Two of them are on the same domain, and the production environment is on an entirely different domain.
Development: https://web.domain1.com/AppDEV
Test: https://web.domain1.com/AppTEST
Production: https://tools.domain2.com/AppPROD

I'll be recording all tests against the DEV site.  Right now, I have https://web.domain1.com/AppDEV in the BaseURL for the project.  Should have I have only put https://web.domain1.com ? Or??  Thanks for any help!

~Shelly

9 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 23 Feb 2011, 05:02 PM
Hello Shelly,

Check out this KB article. If you have further questions don't hesitate to reach us here!

Regards,
Cody
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Shelly
Top achievements
Rank 1
answered on 23 Feb 2011, 07:07 PM
Hi Cody,
I should have been a little more specific in my question. I have read the KB article and watched TelerikTV regarding BaseURL, but they don't really address my question.  The example in the KB article says "http://Server1/MyApplication this step will be recorded as "Navigate to /MyApplication" - the base URL is removed." and gives the example of Server1 and Server2.

My application has two different domain names, and the part after the .com/ isn't consistent:

  • Dev:   https://web.domain1.com/AppDEV
  • Test:   https://web.domain1.com/AppTEST
  • Prod:  https://tools.domain2.com/AppPROD

What do I put in as the baseURL for tests recorded against my DEV environment? 
https://web.domain1.com OR https://web.domain1.com/AppDEV

I understand what the KB article was saying, but my environments aren't as straightforward as your example with the consistent /MyApplication after each different server/URL.  I put https://web.domain1.com/AppDEV into the settings for my project, but I need someone who knows more about this topic to validate I did it correctly before I record too many more tests. :-)

Did I do a better job of explaining the help I am requesting?  Could you update the KB article so it's easier for users with environments similar to where I'm working to understand what to put in the baseURL after we decide the correct info for me to use?

Thanks,
Shelly
0
Accepted
Stoich
Telerik team
answered on 01 Mar 2011, 10:56 AM
Hello Shelly,
    the BaseURL should always be the part of the URL that stays constant for all the different locations. In your case:

  • Dev:   https://web.domain1.com/AppDEV
  • Test:   https://web.domain1.com/AppTEST
  • Prod:  https://tools.domain2.com/AppPROD
these URLs really don't have anything constant for all three. So here's how you would go about it:
Set the BaseURL to https://web.domain1.com/AppDEV and record the test against that URL.
A "Navigate to https://web.domain1.com/AppDEV" step will turn to "Navigate to /" in this case.

Now if you want to execute the same test against the URL https://tools.domain2.com/AppPROD, you create a new TestList and set its BaseURL to be https://tools.domain2.com/AppPROD. Now your "Navigate to /" step will get executed as "Navigate to https://tools.domain2.com/AppPROD". Similarly your other steps will be executed against the new BaseURL.

Let me know if you're having trouble getting this to work!

All the best,
Stoich
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Viral
Top achievements
Rank 1
answered on 29 Jun 2015, 06:23 AM

Hi Telerik,

We have similar situation. We have automated 300 tests. We never configured base URL at project level or test list level before we automated 300 tests. 

We have 2 environments: UAT and Production. We need to run some tests (tests that only read information) on production after each production release for verification. We want to prevent some tests (write / Delete / modify data) on production.

Right now, we use one test that navigates to the specified URL and use that test as a step in all tests to navigate. This is not efficient way of changing environments, as we often run tests on production that could delete / update / write data.

We are looking for solution. How can we restrict test list to run only on UAT environment?

0
Ivaylo
Telerik team
answered on 01 Jul 2015, 03:36 PM
Hello,

Unfortunately since you have not used BaseURL when building your automation the only option is to manually edit all the tests. You can set a baseURL now so you can use it properly in the future.

Thank you for your understanding.

Regards,
Ivaylo
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
0
Viral
Top achievements
Rank 1
answered on 01 Jul 2015, 10:50 PM

Hi Ivaylo,

 

It would be good to have this as feature in Telerik Test Stdio to control test against different environment. 

I also suggest one more feature where tester can add different environment to choose from for test execution and attribute selection for each environment. 

For example, Test has attribute field and tester can add attributes to each test case. For example, Add Read attribute to Test-A, Read attribute to Test-B, Write attribute to Test-C, Write attribute to Test-D.

Environment-UAT has mapping with Read, Write attribute. So when UAT is selected as environment to run test against, all tests that has Read and Write attribute can be executed.

Environment-Production has mapping with Read attribute. So when production is selected as environment to run test against, all tests that has Read attribute can be executed. Tests with write attribute can be skipped.

0
Ivaylo
Telerik team
answered on 06 Jul 2015, 11:07 AM
Hеllo,

Thank you for the input and the feedback, it will be considered in the future.

Regarding the feature requests please note that even you can log a feature request from now on using our feedback portal here. You can use the same telerik account for login.

Regards,
Ivaylo
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
0
Ruchir
Top achievements
Rank 1
answered on 01 Sep 2015, 08:52 AM
Hi Telerik,

 In my case My application URL changes as per the different releases (http://​abcd/​efg/main.aspx) next time it may be(http://​xxxx/​xxx/main.aspx) so will identifying logic can sort this out by just using relative path and query or identification logic is only to  "it's just a way to simply your test project and make it easier to use."  
Note: For some pages title is also changing after releases.

 

I have already created few scripts on earlier version but now these scripts are failing because of unable to identify the frames.
so how the frames are affected by this parameters (Page URL, Title)

How page URL and Titles are used in finding element logic.


What should be my approach to take the maintenance to minimal  . 

Any guidlines on this will be highly apreciated
0
Ivaylo
Telerik team
answered on 02 Sep 2015, 03:05 PM
Hello Ruchir,

Please read this article dedicated to BaseURL where you'll find all the answers to your questions. At the end it is well explained how to deal with frames.

Regards,
Ivaylo
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
Tags
General Discussions
Asked by
Shelly
Top achievements
Rank 1
Answers by
Cody
Telerik team
Shelly
Top achievements
Rank 1
Stoich
Telerik team
Viral
Top achievements
Rank 1
Ivaylo
Telerik team
Ruchir
Top achievements
Rank 1
Share this question
or