Applies to ReadyAPI 3.0, last modified on November 12, 2019

By default, ReadyAPI uses absolute paths to files. This approach may be flawed when you use the same test on multiple machines or share it with multiple users, because not all of them will have the files you need in the same place. To solve this issue, use the Resource Root project property. If this property is specified, ReadyAPI uses relative paths starting from the specified folder.

How to change the property

Selecting the Root Folder

You can specify the root folder in the Resource Root project property. You can specify the absolute path to the folder, or use one of the following options:

  • ${projectDir} – The path to the folder the project is stored in.

  • ${workspaceDir} – The path to the folder containing the workspace file. The default ReadyAPI workspace is stored in the C:\Users\<username>\ folder.

LoadUI agents do not support using ${projectDir} and ${workspaceDir} as values of the Resource Root property.

Sample Usage

Relative paths are most commonly used to share projects and related files by using source control systems. In this case, the project, workspace and related files are stored in the same folder. For example:

The Reference Files folder

In this case, both ${projectDir} and ${workspaceDir} lead to the same folder. Then, you can continue from it to get the files you need. For example, to get a file in the Reference Files folder, you can use the Reference Files/SampleFile.xml path.

See Also

Best Practices

Highlight search results