You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+97-4Lines changed: 97 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,6 +13,22 @@ A parallel executor for [Robot Framework](http://www.robotframework.org) tests.
13
13
14
14
[](https://youtu.be/i0RV6SJSIn8"Pabot presentation at robocon.io 2018")
-[Output Files Generated by Pabot](#output-files-generated-by-pabot)
28
+
-[Artifacts Handling and Parallel Execution Notes](#artifacts-handling-and-parallel-execution-notes)
29
+
30
+
----
31
+
16
32
## Installation:
17
33
18
34
From PyPi:
@@ -245,11 +261,24 @@ Note: The `--ordering` file is intended only for defining the execution order of
245
261
There different possibilities to influence the execution:
246
262
247
263
* The order of suites can be changed.
248
-
* If a directory (or a directory structure) should be executed sequentially, add the directory suite name to a row as a ```--suite``` option.
249
-
* If the base suite name is changing with robot option [```--name / -N```](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#setting-the-name) you can also give partial suite name without the base suite.
264
+
* If a directory (or a directory structure) should be executed sequentially, add the directory suite name to a row as a ```--suite``` option. This usage is also supported when `--testlevelsplit` is enabled. As an alternative to using `--suite` options, you can also group tests into sequential batches using `{}` braces. (See below for details.) Note that if multiple `--suite` options are used, they must not reference the same test case. This means you cannot specify both parent and child suite names at the same time. For instance:
265
+
266
+
```
267
+
--suite Top Suite.Sub Suite
268
+
--suite Top Suite
269
+
```
270
+
271
+
* If the base suite name is changing with robot option [```--name / -N```](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#setting-the-name) you can use either the new or old full test path. For example:
272
+
273
+
```
274
+
--test New Suite Name.Sub Suite.Test 1
275
+
OR
276
+
--test Old Suite Name.Sub Suite.Test 1
277
+
```
278
+
250
279
* You can add a line with text `#WAIT` to force executor to wait until all previous suites have been executed.
251
280
* You can group suites and tests together to same executor process by adding line `{` before the group and `}` after. Note that `#WAIT` cannot be used inside a group.
252
-
* You can introduce dependencies using the word `#DEPENDS` after a test declaration. This keyword can be used several times if it is necessary to refer to several different tests. Please take care that in case of circular dependencies an exception will be thrown. Note that each `#WAIT` splits suites into separate execution blocks, and it's not possible to define dependencies for suites or tests that are inside another `#WAIT` block or inside another `{}`brackets.
281
+
* You can introduce dependencies using the word `#DEPENDS` after a test declaration. This keyword can be used several times if it is necessary to refer to several different tests. The ordering algorithm is designed to preserve the exact user-defined order as closely as possible. However, if a test's execution dependencies are not yet satisfied, the test is postponed and moved to the earliest possible stage where all its dependencies are fulfilled. Please take care that in case of circular dependencies an exception will be thrown. Note that each `#WAIT` splits suites into separate execution blocks, and it's not possible to define dependencies for suites or tests that are inside another `#WAIT` block or inside another `{}`braces.
253
282
* Note: Within a group `{}`, neither execution order nor the `#DEPENDS` keyword currently works. This is due to limitations in Robot Framework, which is invoked within Pabot subprocesses. These limitations may be addressed in a future release of Robot Framework. For now, tests or suites within a group will be executed in the order Robot Framework discovers them — typically in alphabetical order.
254
283
* An example could be:
255
284
@@ -343,4 +372,68 @@ Pabot will insert following global variables to Robot Framework namespace. These
343
372
PABOTEXECUTIONPOOLID - this contains the pool id (an integer) for the current Robot Framework executor. This is helpful for example when visualizing the execution flow from your own listener.
344
373
PABOTNUMBEROFPROCESSES - max number of concurrent processes that pabot may use in execution.
345
374
CALLER_ID - a universally unique identifier for this execution.
346
-
375
+
376
+
377
+
### Output Files Generated by Pabot
378
+
379
+
Pabot generates several output files and folders during execution, both for internal use and for analysis purposes.
380
+
381
+
#### Internal File: `.pabotsuitenames`
382
+
383
+
Pabot creates a `.pabotsuitenames` file in the working directory. This is an internal hash file used to speed up execution in certain scenarios.
384
+
This file can also be used as a base for the `--ordering` file as described earlier. Although technically it can be modified, it will be overwritten during the next execution.
385
+
Therefore, it is **recommended** to maintain a separate file for the `--ordering` option if needed.
386
+
387
+
#### Output Directory Structure
388
+
389
+
In addition to the standard `log.html`, `report.html`, and `output.xml` files, the specified `--outputdir` will contain:
390
+
391
+
- A folder named `pabot_results`, and
392
+
- All defined artifacts (default: `.png` files)
393
+
- Optionally, artifacts from subfolders if `--artifactsinsubfolders` is used
394
+
395
+
Artifacts are **copied** into the output directory and renamed with the following structure:
396
+
397
+
```
398
+
TIMESTAMP-ARGUMENT_INDEX-PABOTQUEUEINDEX
399
+
```
400
+
401
+
-**TIMESTAMP** = Time of `pabot` command invocation (not the screenshot's actual timestamp), format: `YYYYmmdd_HHMMSS`
402
+
-**ARGUMENT_INDEX** = Optional index number, only used if `--argumentfileN` options are given
403
+
-**PABOTQUEUEINDEX** = Process queue index (see section [Global Variables](#global-variables))
404
+
405
+
#### `pabot_results` Folder Structure
406
+
407
+
The structure of the `pabot_results` folder is as follows:
408
+
409
+
```
410
+
pabot_results/
411
+
├── [N]/ # Optional: N = argument file index (if --argumentfileN is used)
412
+
│ └── PABOTQUEUEINDEX/ # One per subprocess
413
+
│ ├── output.xml
414
+
│ ├── robot_argfile.txt
415
+
│ ├── robot_stdout.out
416
+
│ ├── robot_stderr.out
417
+
│ └── artifacts...
418
+
```
419
+
420
+
Each `PABOTQUEUEINDEX` folder contains as default:
421
+
422
+
-`robot_argfile.txt` – Arguments used in that subprocess
423
+
-`robot_stdout.out` and `robot_stderr.out` – Stdout and stderr of the subprocess
424
+
-`output.xml` – The partial output file to be merged later
425
+
- Artifacts – Screenshots or other files copied from subprocess folders
426
+
427
+
> **Note:** The entire `pabot_results` folder is considered temporary and will be **deleted/overwritten** on the next `pabot` run using the same `--outputdir`.
428
+
429
+
430
+
### Artifacts Handling and Parallel Execution Notes
431
+
432
+
Due to parallel execution, artifacts like screenshots should ideally be:
433
+
434
+
- Embedded directly into the XML using tools like [SeleniumLibrary](https://robotframework.org/SeleniumLibrary/SeleniumLibrary.html#Set%20Screenshot%20Directory) with the `EMBED` option
- Or saved to the subprocess’s working directory (usually default behavior), ensuring separation across processes
438
+
439
+
If you manually specify a shared screenshot directory in your test code, **all processes will write to it concurrently**, which may cause issues such as overwriting or missing files if screenshots are taken simultaneously.
0 commit comments