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
Highlighted
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
Highlighted
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
TechCorner Leaderboard
Want a fun and easy way to learn ReadyAPI and show off your skills? Try solving weekly TechCorner challenges and get into the Leaderboard!


Challenge Status

Compare an expected JSON value and actual response in Events

Participate!

Fetch value/data from JSON response using Groovy Script

See replies!

Filtering data retrieved from a DataSource

See replies!

Get data from Petstore and add it to Excel sheets

Participate!
Top Kudoed Authors