Forum Discussion

mneiferbag's avatar
mneiferbag
Contributor
9 years ago
Solved

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.

  • 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.

2 Replies

  • 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.

    • mneiferbag's avatar
      mneiferbag
      Contributor

      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.