Applies to ReadyAPI 3.3.2, last modified on September 18, 2020

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.

Default value

By default, the value of the resource root property is empty. In this case, if you import a project on another machine and files associated with it cannot be found in the folders specified in the project, ReadyAPI will automatically look for them in the project folder.

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
Project Properties

Highlight search results