|
Title: relative path for txt Files to be loaded from in Properties Step Post by: TGupta on October 02, 2007, 11:09:42 pm 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 Title: Re: relative path for txt Files to be loaded from in Properties Step Post by: omatzura on October 02, 2007, 11:13:23 pm 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 Title: Re: relative path for txt Files to be loaded from in Properties Step Post by: nreimertz on October 02, 2007, 11:18:11 pm Yep, there is a tutorial for the use of realtive to the the working directory here
http://www.eviware.com/content/view/51/44/ (http://www.eviware.com/content/view/51/44/), but you are right that relative to the project file might be better. /niclas eviware.com Title: Re: relative path for txt Files to be loaded from in Properties Step Post by: alibaba82 on October 02, 2007, 11:37:21 pm 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 Title: Re: relative path for txt Files to be loaded from in Properties Step Post by: omatzura on October 03, 2007, 07:46:13 pm 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 |