Is it possible to use test lists across different environments if a list contains tests that use different URLs? For example, Test A uses URL abc.com to hit an API that determines the status of a widget. In the middle of Test A, it calls Test B, which uses URL xyz.com to hit a different API that updates the status of the widget. Test A then continues and verifies that the status of the widget has changed.
Currently, I'm "hard-coding" the URL in Test A and Test B and dropping the tests into a list. This works fine for one environment, but we will be moving our APIs to Production eventually, so I'd like to be able to just change the test list to point to the new environment rather create separate tests for each environment.
I'm not seeing a way to make this work, but I thought maybe I'm overlooking something. Any insight (or a work-around) you can provide me will be appreciated!
6 Answers, 1 is accepted
Hi Ivaylo,
Thank you for your reply. Unless I'm missing something, I don't think the article you sent me quite fits my scenario because my test uses two completely different URLs.
To clarify the example in my original post, Test A uses stage.abc.com and it calls Test B that uses stage.xyz.com. I'm trying to use the test list to make those URLs dynamic since the production URLs would be abc.com and xyz.com.
I'm not seeing a way to use a test list across different environments when there are two completely different URLs involved. Please let me know if I'm overlooking something.
Thanks again,
Dennis
Yes, it does not matter that the ULRs are different. You can give it a try. When you start recording you'll notice that when you record a NavigateTo step the BaseURL is stripped from the URL. For instance:
if you have both URLs:
http://stage.abc.com/Login.html
http://xyz_stage.com/Login.html
The recorded step will look like Navigate to: '/Login.html'
So it doesn't matter what the baseURL is you will get it stripped down, and you can use both URLs as a BaseURL.
Hope this is more clear now, if you give it a try I am sure it will get even more clear.
Regards,
Ivaylo
Telerik
Hi Ivaylo,
Can we discuss this via e-mail? I don't think I'm making myself clear, so I'd like to give you better examples of the URLs and more detailed test scenarios.
Thanks,
Dennis
Yes we can, please send all the information to my email address (ivaylo.todorov@telerik.com) and I will take a look.
Regards,
Ivaylo
Telerik