Ask a Question

relative path for txt Files to be loaded from in Properties Step

TGupta
New Contributor

relative path for txt Files to be loaded from in Properties Step

Ole,
Can a txt file be loaded up with a relative path?  This is necessary so that after we check in our scripts in a repository(all the files can be in 1 folder), anyone can check them out and without changing any paths, run the scripts.

Thanks,
Tanvi
4 REPLIES 4
omatzura
Super Contributor

Hi,

currently relative paths are resolved relative to the working directory, I guess you want to resolve relative to the project file?

regards,

/Ole
eviware.com

Yep, there is a tutorial for the use of realtive to the the working directory here

http://www.eviware.com/content/view/51/44/, but you are right that relative to the project file might be better.

/niclas
eviware.com
Product Guy for Ready! API, SoapUI and all things API
alibaba82
Super Contributor

lets say our project file and properties file are in C:\temp
can we use something like

testRunner.testCase.testSuite.project.path\temp
or
context.testCase.testSuite.project.path\temp

in a datasource or properties file.

I saw this in one of your posts about absolute paths in groovy in sourceforge forums.

Thanks

Ali
omatzura
Super Contributor

Hi Ali,

no, this will unfortunately not work.. as you know we are in the process of improving property-related functionality, one improvement will be the availability of a number of predefined properties, including a "projectDir" property containing the folder of the project file, which you will be able to use as you suggest, for example with "${projectDir}\temp.properties" in a properties step source file.. for now you will need a groovy script..

regards,

/Ole
eviware.com
cancel
Showing results for 
Search instead for 
Did you mean: