Forum Discussion

maxrussell's avatar
4 years ago

Excel data sources - using a relative path name for files

We need to use ReadyAPI across different machines. Our code is checked out from Git and sometimes our local directories differ (for example I use E:\, a colleague uses C:\)


As we need to share our data sources (excel files) that are also checked in, how can they be set in ReadyAPI to use a relative Path, instead of fixed paths?

4 Replies

  • PrathapR's avatar
    Frequent Contributor

    Hi maxrussell 

    Can you please use relative paths.

    Instead of using  "E:/GitRepo/Test/Sample.xlsx" use ${projectDir}/GitRepo/Test/Sample.xlsx. Always keep these excel file folders(Ex:GitRepo/Test..along with project file(.xml)  wherever you store, either in version control or local.  And Change like below at project level properties.





    • sonya_m's avatar
      SmartBear Alumni (Retired)

      Thanks everyone!


      maxrussell Does the suggestion help? Please let us know.

  • When I try to use the $projectDir variable, I get errors on my datasource test steps:

    • richie's avatar
      Community Hero
      Hey @maxrussel,

      Can you indicate step by step exactly what you did please?
      Looking at the screenshot it appears that two full paths have concatenated so it reads something like E:/...E:/fullpath