I am using this method to change the config file, and it is working in DevTest when running an ITR.
However, running within a suite the path it is looking to get and load the config file is changing. For example:
import com.itko.lisa.test.Configuration;
String Current_Environment = String.valueOf(ENV_NAME);
//If the project config set to XQA environment then
if (Current_Environment.equals("PQA")){
Configuration.setConfiguration(testExec.getTestCase(), "PQA.config");
}else if (Current_Environment.equals("XQA")){
Configuration.setConfiguration(testExec.getTestCase(), "XQA.config");
}
return;
works when executed as an ITR. However when executed in suite, the path it is looking to load the config file from becomes the DevTest install dir, or 'C:\Program Files\CA\DevTest951' and it errors showing failure to load the config file from that path.
Updated the code above to include the relative path to the config file, using the LISA_RELATIVE_PROJ_ROOT parameter, which also works within a DevTest ITR, but now when executed via suite the error message tells me the path it's seeking the config file is 'C:/Users/e664vv/lisatmp_9.5.1/lads/*.
Very unusual behavior considering the variables given aren't being updated.
Any ideas anyone?