I am using CodedUI for Automation Testing. As I am using two Applications suppose A and B. A needs to be started at the start of execution of each test case. So i have put it in TestInitialize. So i call a function from TestInitialize and send the parameter i.e. location of the Application A. But what if there are different version of App a And i want to send a parameter to TestInitialize .
My present Code is
[TestInitialize()] public void MyTestInitialize() { App_Launch(@"C:\Emulator\App_Version1\Launch_App.exe"); } There are diff app versions So if i have to start App_Version2 then i have to change the folder name in the parameter which is hard coded.
What if i Want the following
[TestInitialize()] public void MyTestInitialize(string Path) { App_Launch(@Path); } send the path to TestInitialize
[Theory]for this