phil89
15 years agoOccasional Contributor
Change workdir ?
Hi I have loaded data with an properties, and default directory seems "bin". Could i load data file from the directory where is stored SOAPUI xml file ? Regards Philippe
import org.apache.commons.io.FileUtils;
//get the path of your local soapui project
def projectroot = context.expand('${projectDir}');
//read the file
File file = new File(projectroot+"\\myfile.sql");
//get the content in a string
def content = FileUtils.readFileToString(file);
//display it the 1st time to be sure it is ok
log.info content
//send me 10 dollars :)