PabotLib helps in parallel execution with pabot
PabotLib contains 4 types of keywords:
To take PabotLib into use call pabot with flag --pabotlib:
pabot --pabotlib [other arguments]
and include PabotLib library in your robot files.
Execution affecting keywords
These allow control to when and where a keyword will be executed.
Run Setup Only Once
Runs a setup keyword with args only once at the first possible moment when
an execution has gone through this step. The executions after that
will skip this step. If the first execution fails, all others will also.
Run Teardown Only Once
Runs a teardown keyword with args only once after all executions have gone
throught this step in the last possible moment.
Note it is important to not have any conditions preventing from executing
this step as that may prevent this keyword from working correctly.
Runs a keyword only once in one of the parallel processes.
Others executing "Run Only Once" with same keyword name
wait before going through this keyword before the actual
command has been executed.
Run On Last Process
Runs a keyword on last process used by pabot.
This keyword will wait until all other processes have stopped executing.
Value transfer between processes
Pabot processes do not share variables by default. These keywords allow sharing of a value
between all processes.
This can be used for example to limit work done by all the processes.
One process can create a new testing environment in a suite setup
(use Run Setup Only Once keyword to limit to only one process).
The process can in the setup publish created environment related values with
Set Parallel Value For Key.
All processes can access these values with Get Parallel Value For Key.
Also a custom wrapper library pabot.SharedLibrary is provided to allow adding new shared functionalities
as a remote library.
Set Parallel Value For Key
Set a globally available key and value that can be accessed
from all the pabot processes.
Get Parallel Value For Key
Get the value for a key. If there is no value for the key then empty
string is returned.
Wait for a lock with name.
This will prevent other processes from acquiring the lock with
the name while it is held. Thus they will wait in the position
where they are acquiring the lock until the process that has it
Release a lock with name.
This will enable other processes to acquire the lock.
Release all locks owned by this process.