Can test lists be used across different environments when tests use different URLs?

7 posts, 0 answers
  1. Dennis
    Dennis avatar
    18 posts
    Member since:
    May 2014

    Posted 05 Aug 2015 Link to this post

    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!

  2. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 10 Aug 2015 Link to this post

    Hello Dennis,

    Please check this article on this topic.

    Hope it helps.

    Regards,
    Ivaylo
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  3. Dennis
    Dennis avatar
    18 posts
    Member since:
    May 2014

    Posted 12 Aug 2015 in reply to Ivaylo Link to this post

    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

  4. Dennis
    Dennis avatar
    18 posts
    Member since:
    May 2014

    Posted 12 Aug 2015 in reply to Dennis Link to this post

    Just to clarify, the URLs both have the word "stage" in them for the stage environment, but they are unique (e.g., stage.abc.com and xyz_stage.com). Thanks again.
  5. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 17 Aug 2015 Link to this post

    Hello 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
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  6. Dennis
    Dennis avatar
    18 posts
    Member since:
    May 2014

    Posted 19 Aug 2015 in reply to Ivaylo Link to this post

    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

  7. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 24 Aug 2015 Link to this post

    Hello 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
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top