Skip to content

What are the Docker volumes for in Botium Box ?

Question

We have a mount volume on Botium container like below, What purpose they exactly using volumes on botium container.

volumes:

  • ./testsets:/app/server/testsets

  • ./botiumwork:/app/server/botiumwork

  • ./botiumwork:/app/agent/botiumwork

  • ./resources:/app/server/resources

  • ./resources:/app/agent/resources

It seems above commands, To store testcases and test results on that path. But we verified on Database that test result are available in DB.

But still we have a query, what purpose they using above paths.

Answer

It is right that Botium stores most information in the database. But there are some reasonable exceptions to this, and that's why Botium Box has some special directories (Docker volumes):

With the "testsets" directory, it is possible to import a large amount of test cases at once. For example, our predefined test sets coming with Botium Box Enterprise are delivered as a package of thousands of text files. You just have to unpack them in to this folder to make them available to Botium Box.

The "resources" directory is for placing additional configuration files or Botium Box exensions you might need. For example, when developing your own connector, you can make it available to Botium Box by placing it into the resources directory.

The "botiumwork" directory is used as temporary storage for test runs, log files, screenshots etc. By default, all those files are cleaned up when a test run is ready, but in some cases it might be useful for troubleshooting to have access to those files.

If for some reason it is a problem to handle those Docker volumes, you can as well remove them from the docker-compose file, Botium Box will work without the as well (or better to say, all those directories will be mapped to the internal file system of the Docker containers, invisible from the outside). The only Docker volume I recommend to leave in place is the "mysql" volume - if you remove this volume, all Botium Box data is persisted within a Docker container, and it will be lost whenever the Docker container is regenerated (with a Botium Box update, for example).