All Projects → rajeevnaikte → distbot

rajeevnaikte / distbot

Licence: Apache-2.0 license
Distributed/parallel execution of Robot Framework test suites using multiple docker containers

Programming Languages

python
139335 projects - #7 most used programming language
Dockerfile
14818 projects
RobotFramework
109 projects
Batchfile
5799 projects

distbot

Distributed/parallel execution of Robot Framework (RF) test suites using multiple docker containers

Demo

https://www.youtube.com/watch?v=KL4V0QkMMVc

How it works

Start multiple docker containers of rajeevnaikte/distbot (e.g. docker-compose up --scale=4), with all pointing to a shared volume folder (please refer docker-compose volumes for configurations), where the robot framework test suites are stored, and set argument --mode distributed (e.g. in docker-compose.yml file). Each robot suite/file will be run in a separate process/container. This program will automatically distribute the suites among the docker containers and run in parallel (without need of a master node). Also, in each container multiple suites can be run in parallel as per the --max-* configurations mentioned below. Once all suites are completed, one of the container will execute rebot of robot framework to combine all the reports. The report will be stored in same shared volume folder (You can also specify different location using --outputdir argument of robot frameowrk).

Usage

pip install robotframework-distbot
Run the docker container or python -m distbot with -h argument to see all options of the progam.

usage: -e ENV [options] main_suite [robot arguments]

Explanation: first give options from below list as per your need (these are specific to this library),
next give main suite name (folder name), next give RF arguments as per your needs (these are RF specific as mentioned in thier guide).
If there is a conflicting options between this library and RF, then you can use full name for that option in RF.
E.g. -e is used by this library for ENV, but RF as well has it for exclude option. So you can use --exclude for RF.
i.e. -e ENV my_suite --exclude something

positional arguments:
  main_suite            Folder name containing all the robot framework scripts.

optional arguments:
  -h, --help            show this help message and exit
  -e E                  dev, stage, prod etc. This value will be available as variable ENV.
  -b B                  This value will be available as variable BROWSER.
  --mode {sequential,distributed}
  --max-cpu-percent MAX_CPU_PERCENT
                        Program will stop spawning new process when cpu usage reaches this value.
  --max-memory MAX_MEMORY
                        Program will stop spawning new process when memory usage reaches this value.
  --max-processes MAX_PROCESSES
                        Program will stop spawning new process when running processes count is this value.
  -d OUTPUTDIR, --outputdir OUTPUTDIR
                        Directory to save report files. Default is workingdir/report
  -s SUITE, --suite SUITE
                        Only run suites matching this value

Assistant mode

There is an assistant library here to use during development. This program will keep the robot framework running, and allow you to type in the keywords from terminal/cmd prompt. It is a good tool for web-developers while coding to see the effect while trying out differnet logics.
Starting assistant is simply using keywork 'start assistant'. e.g. in this repo there is file Assistant/assistant.robot. Just run that -
python -m distbot -e local -b ff Assistant

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].