QConnect - Tips & troubleshooting

Tips

Running detached

To keep image running even if you close the terminal window, you can use -d option in your docker run command:

docker run -ti --rm -d --name containername --mount type=volume,src=volumename,dst=/agent --shm-size=256m qconnect

Mounting host filesystem

To get access to host machine’s files, you can bind a host directory using --mount option. Define the host folder in src and destination folder in dst.

docker run -ti --rm --name containername --mount type=volume,src=volumename,dst=/agent --shm-size=256m --mount type=bind,src=/my/output/dir/on/the/host,dst=/output qconnect --debug

Location of result files

The test results of the latest run are available locally on the machine that runs the QConnect agent.

  • On Windows, the result files can be found by opening FIle Explorer and typing %LOCALAPPDATA%\Copado\QConnect\results in the location bar.`

  • When using Docker, add another --mount option to the command line:

    • docker run --mount type=bind,src=local-directory,dst=/results

    • (leave other remaining options as usual)

    • The local-directory must exist on the machine that runs the Docker engine. The result files are created under that directory, with read permissions for all users

Troubleshooting

Agent shows as Disconnected on the QConnect page

Click the Refresh agents button on the top of the QConnect page to update the status. If the Status column still shows Disconnected, you may need to manually restart the agent. To do this, open the terminal window that runs the agent and press ctrl-C to stop the agent. Then run again the same docker run command that you used to start the agent. Make sure to enter the same volumename argument, so that the agent finds its authorization data. `

A run is queued but does not get executed

Check on the QConnect page that there is an idle agent that could start executing the run.

Make sure that all while demands of the robot are fulfilled by one of the idle agents, i.e., the agent has a capability with the same name and value as each robot demand. If necessary, edit the demands of the robot on the test suite page or edit the capabilities of the agent on the QConnect page. You may still need to abort the queued run and start a new run.

Docker container disappears after Docker restart

If the Docker daemon (or the entire host operating system) restarts, the Docker container of each agent disappears due to the --rm flag in the docker run command. You can start each agent again in a new container by running the same docker run command that you used to start the agent. Make sure to enter the same volumename argument, so that the agent finds its authorization data.

Debug prints

To get detailed information in the terminal about what an agent is doing, start it with an extra ‑‑debug option, i.e.:

docker run -ti --rm --name containername --mount type=volume,src=volumename,dst=/agent --shm-size=256m qconnect --debug