LZhang
18 years agoFrequent Contributor
relative path for input/output files
Hi, Ole:
I use external txt files for Datasource input as well as I output my xml request/response to external files. One issue I saw in testing
was if other people want to run my soapUI project files, they will run into error since they might have different directory path.
Can you add a “testDir” option somewhere in preference that way, for example, we can set testDir = C:\Workspace\QA\Automation
and then in my datasource configuration, leave a field for the user to set up the rest of the path, in this case,
File: TestDir\SoapUI\Phase2.5\myProject.xml
Or we can call TestDir in our groovy script
def msg=context.getProperty("GetDVRDevices_AfterUnlink#Response")
new File(context.testCase.testSuite.project.testDir+ "GetDVRDevices_AfterUnlinkRS" + dateFormat.format(date) + ".txt").write(msg2)
Or do you have a better suggestion?
I am concern about how other people can call my input and output files correctly if using relative path.
Thanks,
Li
I use external txt files for Datasource input as well as I output my xml request/response to external files. One issue I saw in testing
was if other people want to run my soapUI project files, they will run into error since they might have different directory path.
Can you add a “testDir” option somewhere in preference that way, for example, we can set testDir = C:\Workspace\QA\Automation
and then in my datasource configuration, leave a field for the user to set up the rest of the path, in this case,
File: TestDir\SoapUI\Phase2.5\myProject.xml
Or we can call TestDir in our groovy script
def msg=context.getProperty("GetDVRDevices_AfterUnlink#Response")
new File(context.testCase.testSuite.project.testDir+ "GetDVRDevices_AfterUnlinkRS" + dateFormat.format(date) + ".txt").write(msg2)
Or do you have a better suggestion?
I am concern about how other people can call my input and output files correctly if using relative path.
Thanks,
Li