I would like to organize the embedded api project in respective folders for tests to be organised. How can this be done with the least impact to the UI? How can i identify which UI tests are calling the api's to adjust the path?
You can edit the Embedded API project from the Test Studio project's context menu and create the appropriate folder structure. If you move the API tests to different folders, the tests that were already referenced in a web test, will have their paths broken. There are two ways to fix the paths of the API test as steps in your Test Studio project.
Open the web test that references a relocated API test as step and select that step. Change the TestPath property from the Properties pane to the new location of the API test in the embedded API project (see TestPathForAPIStep.png).
Open the web test that references a relocated API test as step and convert this step to code. This will generate a coded step with similar code to the one below. You can change the test path string from there.
// Execute API test 'Test2'
System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<string, string>> variables = new System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<string, string>>();
this.ExecuteApiTest(".\\ApiTestFolder\\Test2", variables);
The TestPath property can also be used to check which APITest is referenced in the API test as step. There is no global way of checking the links between APITests and API test as steps in the UI.
I hope the above details and suggested approaches will be helpful to you. Let me know if you have any follow up questions.
Regards,
Plamen Mitrev
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Test Studio course! Check it out at https://learn.telerik.com/.