When working with file paths in various commands in accelQ, you have an option to specify either a relative path or absolute path to the file.
Using relative path makes your action logic portable for runs against any agent. Each local agent may have a different folder structure or running on different OS, but relative path ensures consistency.
Working with Relative Paths
When the path specified for commands is relative, system looks for the file under the following folder:
<agent deployment folder>/user_data
Here is an example, which creates, writes and reads the file content - all without specifying full path. One test may create a file under the agent/user_data and another test can subsequently read it, without ever specifying the absolute path of the file.
This is applicable for all file related commands such as Excel file operations, XML/JSON file parsing etc.
Working with Absolute Paths
In some situation, your test logic may refer to an absolute path of a file. Make sure this absolute path is accessible from all the Local Agent machines consistently. When the test is running, the file is looked up from the local agent.
This may be the case when your test logic is working with some standard shared folder in your organization. In such cases, make sure the shared folder is mapped to same Drive on all the machines where the test may be executing.
Notice that the absolute path (in the shared drive, "G") has been set to a local parameter using Expression Builder in the first line of this logic. Rest of the statements are about writing and subsequently reading this content.