cancel
Showing results for 
Search instead for 
Did you mean: 

Can I use relative path in SoapUI NG data source test step?

SOLVED
Highlighted
Contributor

Can I use relative path in SoapUI NG data source test step?

Hi, with the data source test step in SoapUI NG, is there any way to specifiy a filename relative to the directory of the project file? Ideally I would like to write something like ${ProjectDirectory}/myExcel.xlsx to avoid using absolute paths.

 

I'm using Ready! API 1.5.0.

 

Thanks in advance.

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions
Contributor

Re: Can I use relative path in SoapUI NG data source test step?

Select your project from the navigator pane, and in 'Project Properties', set the Resource Root to ${projectDir} and that should do the trick. I don't even think you need to pass the variable, you could just do myExcel.xlsx

 

I should clarify, I believe this sets the 'root' to the directory where your project is saved.

View solution in original post

2 REPLIES 2
Contributor

Re: Can I use relative path in SoapUI NG data source test step?

Select your project from the navigator pane, and in 'Project Properties', set the Resource Root to ${projectDir} and that should do the trick. I don't even think you need to pass the variable, you could just do myExcel.xlsx

 

I should clarify, I believe this sets the 'root' to the directory where your project is saved.

View solution in original post

Highlighted
Contributor

Re: Can I use relative path in SoapUI NG data source test step?

Thank you for your reply. I have found what you describe in the documentation here: http://readyapi.smartbear.com/structure/projects/properties/resource_root. However, I'm a bit confused about the description there. The example says

 

"Let's say you have an excel file “testdata.xls” you access from the project. The directory d:\projects\ contains workspace files and the project directory is “d:\projects\webservice\"

 

But then it says

 

"Specifying “${projectDir}\data” resolves to “d:\projects\data\testdata.xls”. Specifying “${workspaceDir}\data” resolves to “d:\projects\webservice\data\testdata.xls”."

 

I don't get it.

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors