Part of our software uses a lot of API calls. I have tests build for these API calls to test them in the API side of Telerik. I have a Web project built for testing the UI side of things and I have web tests built that import API tests as a step so that I can include my API tests in test lists and have them run on a normal schedule. What I am needing to do is run my API tests against multiple environments. I have done this in the past just by duplicating the API tests and the web tests to have a test for each environment. As you can imagine this makes it a bit of a pain to maintain the tests.
I already have variables set in the API tests that I am using. What I would like to do is be able to pass a variable for baseURL, Username and Password from the web test to the API test. Is this possible? If so what is the best way to go about it? I read on this link https://docs.telerik.com/teststudio/knowledge-base/test-execution-kb/run-api-test-in-web-test#advanced-passing-a-variable-from-an-api-test-to-a-web-test about passing a variable from the API test back to a web test by basically writing the variable in the Variables folder then pulling that from the web test. Can I do that just in reverse, Write the variable from the web test for the API test to use? Is that my only option? I would love to hear any and all of your thoughts!! Thanks!!