robotframework-pabot 5.0.0__tar.gz → 5.2.0b1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {robotframework_pabot-5.0.0/src/robotframework_pabot.egg-info → robotframework_pabot-5.2.0b1}/PKG-INFO +93 -42
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/README.md +92 -38
- robotframework_pabot-5.2.0b1/pyproject.toml +12 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/setup.cfg +3 -1
- robotframework_pabot-5.2.0b1/src/pabot/ProcessManager.py +376 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/src/pabot/__init__.py +1 -1
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/src/pabot/arguments.py +80 -24
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/src/pabot/pabot.py +392 -166
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/src/pabot/pabotlib.py +1 -1
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/src/pabot/result_merger.py +2 -2
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/src/pabot/robotremoteserver.py +27 -7
- robotframework_pabot-5.2.0b1/src/pabot/skip_listener.py +7 -0
- robotframework_pabot-5.2.0b1/src/pabot/timeout_listener.py +5 -0
- robotframework_pabot-5.2.0b1/src/pabot/writer.py +110 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1/src/robotframework_pabot.egg-info}/PKG-INFO +93 -42
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/src/robotframework_pabot.egg-info/SOURCES.txt +8 -1
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/tests/test_basic_arguments.py +2 -2
- robotframework_pabot-5.2.0b1/tests/test_dynamic_ordering.py +345 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/tests/test_missing_subprocess_output.py +1 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/tests/test_pabot.py +56 -12
- robotframework_pabot-5.2.0b1/tests/test_pabot_process_handling.py +284 -0
- robotframework_pabot-5.2.0b1/tests/test_pabot_timeout.py +85 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/tests/test_pabotprerunmodifier.py +4 -1
- robotframework_pabot-5.2.0b1/tests/test_robotremoteserver.py +64 -0
- robotframework_pabot-5.0.0/LICENSE.txt +0 -202
- robotframework_pabot-5.0.0/pyproject.toml +0 -3
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/MANIFEST.in +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/setup.py +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/src/pabot/SharedLibrary.py +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/src/pabot/clientwrapper.py +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/src/pabot/coordinatorwrapper.py +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/src/pabot/execution_items.py +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/src/pabot/py3/__init__.py +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/src/pabot/py3/client.py +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/src/pabot/py3/coordinator.py +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/src/pabot/py3/messages.py +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/src/pabot/py3/worker.py +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/src/pabot/workerwrapper.py +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/src/robotframework_pabot.egg-info/dependency_links.txt +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/src/robotframework_pabot.egg-info/entry_points.txt +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/src/robotframework_pabot.egg-info/requires.txt +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/src/robotframework_pabot.egg-info/top_level.txt +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/tests/test_arguments_output.py +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/tests/test_depends.py +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/tests/test_functional.py +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/tests/test_ordering.py +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/tests/test_pabotlib.py +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/tests/test_pabotsuitenames_io.py +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/tests/test_prerunmodifier.py +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/tests/test_resultmerger.py +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/tests/test_run_empty_suite.py +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/tests/test_stacktrace.py +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/tests/test_suite_structure.py +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/tests/test_testlevelsplit_include.py +0 -0
- {robotframework_pabot-5.0.0 → robotframework_pabot-5.2.0b1}/tests/test_testlevelsplit_output_task_order.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: robotframework-pabot
|
|
3
|
-
Version: 5.
|
|
3
|
+
Version: 5.2.0b1
|
|
4
4
|
Summary: Parallel test runner for Robot Framework
|
|
5
5
|
Home-page: https://pabot.org
|
|
6
6
|
Download-URL: https://pypi.python.org/pypi/robotframework-pabot
|
|
@@ -12,17 +12,14 @@ Classifier: Intended Audience :: Developers
|
|
|
12
12
|
Classifier: Natural Language :: English
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
14
|
Classifier: Topic :: Software Development :: Testing
|
|
15
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
15
|
Classifier: Development Status :: 5 - Production/Stable
|
|
17
16
|
Classifier: Framework :: Robot Framework
|
|
18
17
|
Requires-Python: >=3.6
|
|
19
18
|
Description-Content-Type: text/markdown
|
|
20
|
-
License-File: LICENSE.txt
|
|
21
19
|
Requires-Dist: robotframework>=3.2
|
|
22
20
|
Requires-Dist: robotframework-stacktrace>=0.4.1
|
|
23
21
|
Requires-Dist: natsort>=8.2.0
|
|
24
22
|
Dynamic: download-url
|
|
25
|
-
Dynamic: license-file
|
|
26
23
|
|
|
27
24
|
# Pabot
|
|
28
25
|
|
|
@@ -47,7 +44,7 @@ A parallel executor for [Robot Framework](http://www.robotframework.org) tests.
|
|
|
47
44
|
- [Contributing](#contributing-to-the-project)
|
|
48
45
|
- [Command-line options](#command-line-options)
|
|
49
46
|
- [PabotLib](#pabotlib)
|
|
50
|
-
- [Controlling execution order](#controlling-execution-order-and-level-of-parallelism)
|
|
47
|
+
- [Controlling execution order, mode and level of parallelism](#controlling-execution-order-mode-and-level-of-parallelism)
|
|
51
48
|
- [Programmatic use](#programmatic-use)
|
|
52
49
|
- [Global variables](#global-variables)
|
|
53
50
|
- [Output Files Generated by Pabot](#output-files-generated-by-pabot)
|
|
@@ -98,65 +95,89 @@ There are several ways you can help in improving this tool:
|
|
|
98
95
|
- Report an issue or an improvement idea to the [issue tracker](https://github.com/mkorpela/pabot/issues)
|
|
99
96
|
- Contribute by programming and making a pull request (easiest way is to work on an issue from the issue tracker)
|
|
100
97
|
|
|
98
|
+
Before contributing, please read our detailed contributing guidelines:
|
|
99
|
+
|
|
100
|
+
- [Contributing Guide](CONTRIBUTING.md)
|
|
101
|
+
- [Code of Conduct](CODE_OF_CONDUCT.md)
|
|
102
|
+
- [Security Policy](SECURITY.md)
|
|
103
|
+
|
|
101
104
|
## Command-line options
|
|
105
|
+
<!-- NOTE:
|
|
106
|
+
The sections inside these docstring markers are also used in Pabot's --help output.
|
|
107
|
+
Currently, the following transformations are applied:
|
|
108
|
+
- Remove Markdown links but keep the text
|
|
109
|
+
- Remove ** and backticks `
|
|
110
|
+
|
|
111
|
+
If you modify this part, make sure the Markdown section still looks clean and readable in the --help output. -->
|
|
112
|
+
|
|
102
113
|
<!-- START DOCSTRING -->
|
|
114
|
+
```
|
|
103
115
|
pabot [--verbose|--testlevelsplit|--command .. --end-command|
|
|
104
116
|
--processes num|--no-pabotlib|--pabotlibhost host|--pabotlibport port|
|
|
105
117
|
--processtimeout num|
|
|
106
118
|
--shard i/n|
|
|
107
119
|
--artifacts extensions|--artifactsinsubfolders|
|
|
108
|
-
--resourcefile file|--argumentfile[num] file|--suitesfrom file
|
|
120
|
+
--resourcefile file|--argumentfile[num] file|--suitesfrom file
|
|
121
|
+
--ordering <FILENAME> [static|dynamic] [skip|run_all]|
|
|
109
122
|
--chunk|
|
|
110
123
|
--pabotprerunmodifier modifier|
|
|
111
124
|
--no-rebot|
|
|
112
125
|
--help|--version]
|
|
113
126
|
[robot options] [path ...]
|
|
127
|
+
```
|
|
114
128
|
|
|
115
129
|
PabotLib remote server is started by default to enable locking and resource distribution between parallel test executions.
|
|
116
130
|
|
|
117
|
-
Supports all [Robot Framework command line options](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#
|
|
131
|
+
Supports all [Robot Framework command line options](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#command-line-options) and also following pabot options:
|
|
118
132
|
|
|
119
|
-
|
|
133
|
+
**--verbose**
|
|
120
134
|
More output from the parallel execution.
|
|
121
135
|
|
|
122
|
-
|
|
136
|
+
**--testlevelsplit**
|
|
123
137
|
Split execution on test level instead of default suite level. If .pabotsuitenames contains both tests and suites then
|
|
124
138
|
this will only affect new suites and split only them. Leaving this flag out when both suites and tests in
|
|
125
139
|
.pabotsuitenames file will also only affect new suites and add them as suite files.
|
|
126
140
|
|
|
127
|
-
|
|
141
|
+
**--command [ACTUAL COMMANDS TO START ROBOT EXECUTOR] --end-command**
|
|
128
142
|
RF script for situations where robot is not used directly.
|
|
129
143
|
|
|
130
|
-
|
|
144
|
+
**--processes [NUMBER OF PROCESSES]**
|
|
131
145
|
How many parallel executors to use (default max of 2 and cpu count). Special option "all" will use as many processes as
|
|
132
146
|
there are executable suites or tests.
|
|
133
147
|
|
|
134
|
-
|
|
148
|
+
**--no-pabotlib**
|
|
135
149
|
Disable the PabotLib remote server if you don't need locking or resource distribution features.
|
|
136
150
|
|
|
137
|
-
|
|
151
|
+
**--pabotlibhost [HOSTNAME]**
|
|
138
152
|
Connect to an already running instance of the PabotLib remote server at the given host (disables the local PabotLib
|
|
139
153
|
server start). For example, to connect to a remote PabotLib server running on another machine:
|
|
140
154
|
|
|
141
155
|
pabot --pabotlibhost 192.168.1.123 --pabotlibport 8271 tests/
|
|
142
156
|
|
|
143
|
-
The remote server can be
|
|
157
|
+
The remote server can also be started and executed separately from pabot instances:
|
|
144
158
|
|
|
145
159
|
python -m pabot.pabotlib <path_to_resourcefile> <host> <port>
|
|
146
160
|
python -m pabot.pabotlib resource.txt 192.168.1.123 8271
|
|
147
161
|
|
|
148
162
|
This enables sharing a resource with multiple Robot Framework instances.
|
|
149
163
|
|
|
150
|
-
|
|
164
|
+
Additional details:
|
|
165
|
+
- The default value for --pabotlibhost is 127.0.0.1.
|
|
166
|
+
- If you provide a hostname other than 127.0.0.1, the local PabotLib server startup is automatically disabled.
|
|
167
|
+
|
|
168
|
+
**--pabotlibport [PORT]**
|
|
151
169
|
Port number of the PabotLib remote server (default is 8270). See --pabotlibhost for more information.
|
|
152
170
|
|
|
153
|
-
|
|
171
|
+
Behavior with port and host settings:
|
|
172
|
+
- If you set the port value to 0 and --pabotlibhost is 127.0.0.1 (default), a free port on localhost will be assigned automatically.
|
|
173
|
+
|
|
174
|
+
**--processtimeout [TIMEOUT]**
|
|
154
175
|
Maximum time in seconds to wait for a process before killing it. If not set, there's no timeout.
|
|
155
176
|
|
|
156
|
-
|
|
177
|
+
**--shard [INDEX]/[TOTAL]**
|
|
157
178
|
Optionally split execution into smaller pieces. This can be used for distributing testing to multiple machines.
|
|
158
179
|
|
|
159
|
-
|
|
180
|
+
**--artifacts [FILE EXTENSIONS]**
|
|
160
181
|
List of file extensions (comma separated). Defines which files (screenshots, videos etc.) from separate reporting
|
|
161
182
|
directories would be copied and included in a final report. Possible links to copied files in RF log would be updated
|
|
162
183
|
(only relative paths supported). The default value is `png`.
|
|
@@ -165,49 +186,53 @@ Supports all [Robot Framework command line options](https://robotframework.org/r
|
|
|
165
186
|
|
|
166
187
|
--artifacts png,mp4,txt
|
|
167
188
|
|
|
168
|
-
|
|
189
|
+
The artifact naming conventions are described in the README.md section: [Output Files Generated by Pabot](#output-files-generated-by-pabot).
|
|
190
|
+
|
|
191
|
+
**--artifactsinsubfolders**
|
|
169
192
|
Copy artifacts located not only directly in the RF output dir, but also in it's sub-folders.
|
|
170
193
|
|
|
171
|
-
|
|
194
|
+
**--resourcefile [FILEPATH]**
|
|
172
195
|
Indicator for a file that can contain shared variables for distributing resources. This needs to be used together with
|
|
173
196
|
pabotlib option. Resource file syntax is same as Windows ini files. Where a section is a shared set of variables.
|
|
174
197
|
|
|
175
|
-
|
|
198
|
+
**--argumentfile[INTEGER] [FILEPATH]**
|
|
176
199
|
Run same suites with multiple [argumentfile](http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#argument-files) options.
|
|
177
200
|
|
|
178
201
|
For example:
|
|
179
202
|
|
|
180
203
|
--argumentfile1 arg1.txt --argumentfile2 arg2.txt
|
|
181
204
|
|
|
182
|
-
|
|
205
|
+
**--suitesfrom [FILEPATH TO OUTPUTXML]**
|
|
183
206
|
Optionally read suites from output.xml file. Failed suites will run first and longer running ones will be executed
|
|
184
207
|
before shorter ones.
|
|
185
208
|
|
|
186
|
-
|
|
187
|
-
Optionally give execution order from a file.
|
|
209
|
+
**--ordering [FILE PATH] [MODE] [FAILURE POLICY]**
|
|
210
|
+
Optionally give execution order from a file. See README.md section: [Controlling execution order, mode and level of parallelism](#controlling-execution-order-mode-and-level-of-parallelism)
|
|
211
|
+
- MODE (optional): [static (default)|dynamic]
|
|
212
|
+
- FAILURE POLICY (optional, only in dynamic mode): [skip|run_all (default)]
|
|
188
213
|
|
|
189
|
-
|
|
214
|
+
**--chunk**
|
|
190
215
|
Optionally chunk tests to PROCESSES number of robot runs. This can save time because all the suites will share the same
|
|
191
216
|
setups and teardowns.
|
|
192
217
|
|
|
193
|
-
|
|
218
|
+
**--pabotprerunmodifier [PRERUNMODIFIER MODULE OR CLASS]**
|
|
194
219
|
Like Robot Framework's --prerunmodifier, but executed only once in the pabot's main process after all other
|
|
195
220
|
--prerunmodifiers. But unlike the regular --prerunmodifier command, --pabotprerunmodifier is not executed again in each
|
|
196
221
|
pabot subprocesses. Depending on the intended use, this may be desirable as well as more efficient. Can be used, for
|
|
197
222
|
example, to modify the list of tests to be performed.
|
|
198
223
|
|
|
199
|
-
|
|
224
|
+
**--no-rebot**
|
|
200
225
|
If specified, the tests will execute as usual, but Rebot will not be called to merge the logs. This option is designed
|
|
201
226
|
for scenarios where Rebot should be run later due to large log files, ensuring better memory and resource availability.
|
|
202
227
|
Subprocess results are stored in the pabot_results folder.
|
|
203
228
|
|
|
204
|
-
|
|
229
|
+
**--help**
|
|
205
230
|
Print usage instructions.
|
|
206
231
|
|
|
207
|
-
|
|
232
|
+
**--version**
|
|
208
233
|
Print version information.
|
|
209
234
|
|
|
210
|
-
Example usages
|
|
235
|
+
**Example usages:**
|
|
211
236
|
|
|
212
237
|
pabot test_directory
|
|
213
238
|
pabot --exclude FOO directory_to_tests
|
|
@@ -226,6 +251,9 @@ These can be helpful when you must ensure that only one of the processes uses so
|
|
|
226
251
|
|
|
227
252
|
PabotLib Docs are located at https://pabot.org/PabotLib.html.
|
|
228
253
|
|
|
254
|
+
Note that PabotLib uses the XML-RPC protocol, which does not support all possible object types.
|
|
255
|
+
These limitations are described in the Robot Framework documentation in chapter [Supported argument and return value types](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#supported-argument-and-return-value-types).
|
|
256
|
+
|
|
229
257
|
### PabotLib example:
|
|
230
258
|
|
|
231
259
|
test.robot
|
|
@@ -271,18 +299,28 @@ pabot call using resources from valueset.dat
|
|
|
271
299
|
|
|
272
300
|
pabot --pabotlib --resourcefile valueset.dat test.robot
|
|
273
301
|
|
|
274
|
-
### Controlling execution order and level of parallelism
|
|
302
|
+
### Controlling execution order, mode, and level of parallelism
|
|
275
303
|
|
|
276
304
|
.pabotsuitenames file contains the list of suites that will be executed.
|
|
277
|
-
|
|
278
|
-
The file
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
305
|
+
This file is created during pabot execution if it does not already exist. It acts as a cache to speed up processing when re-executing the same tests.
|
|
306
|
+
The file can be manually edited partially, but a simpler and more controlled approach is to use:
|
|
307
|
+
|
|
308
|
+
```bash
|
|
309
|
+
--ordering <FILENAME> [static|dynamic] [skip|run_all]
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
- **FILENAME** – path to the ordering file.
|
|
313
|
+
- **mode** – optional execution mode, either `static` (default) or `dynamic`.
|
|
314
|
+
- `static` executes suites in predefined stages.
|
|
315
|
+
- `dynamic` executes tests as soon as all their dependencies are satisfied, allowing more optimal parallel execution.
|
|
316
|
+
- **failure_policy** – determines behavior when dependencies fail. Used only in dynamic mode. Optional:
|
|
317
|
+
- `skip` – dependent tests are skipped if a dependency fails.
|
|
318
|
+
- `run_all` – all tests run regardless of failures (default).
|
|
282
319
|
|
|
283
|
-
|
|
320
|
+
The ordering file syntax is similar to `.pabotsuitenames` but does not include the first 4 hash rows used by pabot. The ordering file defines the **execution order and dependencies** of suites and tests.
|
|
321
|
+
The actual selection of what to run must still be done using options like `--test`, `--suite`, `--include`, or `--exclude`.
|
|
284
322
|
|
|
285
|
-
|
|
323
|
+
#### Controlling execution order
|
|
286
324
|
|
|
287
325
|
There different possibilities to influence the execution:
|
|
288
326
|
|
|
@@ -294,7 +332,7 @@ There different possibilities to influence the execution:
|
|
|
294
332
|
--suite Top Suite
|
|
295
333
|
```
|
|
296
334
|
|
|
297
|
-
* If the base suite name is changing with robot option [```--name / -N```](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#setting-
|
|
335
|
+
* If the base suite name is changing with robot option [```--name / -N```](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#setting-suite-name) you can use either the new or old full test path. For example:
|
|
298
336
|
|
|
299
337
|
```
|
|
300
338
|
--test New Suite Name.Sub Suite.Test 1
|
|
@@ -304,8 +342,14 @@ OR
|
|
|
304
342
|
|
|
305
343
|
* You can add a line with text `#WAIT` to force executor to wait until all previous suites have been executed.
|
|
306
344
|
* 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.
|
|
307
|
-
* 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.
|
|
308
|
-
|
|
345
|
+
* 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.
|
|
346
|
+
* 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.
|
|
347
|
+
* Please take care that in case of circular dependencies an exception will be thrown.
|
|
348
|
+
* 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.
|
|
349
|
+
* Ordering mode effect to execution:
|
|
350
|
+
* **Dynamic mode** will schedule dependent tests as soon as all their dependencies are satisfied. Note that in dynamic mode `#WAIT` is ignored, but you can achieve same results with using only `#DEPENDS` keywords.
|
|
351
|
+
* **Static mode** preserves stage barriers and executes the next stage only after all tests in the previous stage finish.
|
|
352
|
+
* 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.
|
|
309
353
|
* An example could be:
|
|
310
354
|
|
|
311
355
|
```
|
|
@@ -359,7 +403,7 @@ where order.txt is:
|
|
|
359
403
|
#SLEEP 8
|
|
360
404
|
```
|
|
361
405
|
|
|
362
|
-
|
|
406
|
+
Possible output could be:
|
|
363
407
|
|
|
364
408
|
```
|
|
365
409
|
2025-02-15 19:15:00.408321 [0] [ID:1] SLEEPING 6 SECONDS BEFORE STARTING Data 1.suite C
|
|
@@ -424,6 +468,12 @@ Artifacts are **copied** into the output directory and renamed with the followin
|
|
|
424
468
|
TIMESTAMP-ARGUMENT_INDEX-PABOTQUEUEINDEX
|
|
425
469
|
```
|
|
426
470
|
|
|
471
|
+
If you use the special option `notimestamps` at the end of the `--artifacts` command, (For example: `--artifacts png,txt,notimestamps`) the timestamp part will be omitted, and the name will be in the format:
|
|
472
|
+
|
|
473
|
+
```
|
|
474
|
+
ARGUMENT_INDEX-PABOTQUEUEINDEX
|
|
475
|
+
```
|
|
476
|
+
|
|
427
477
|
- **TIMESTAMP** = Time of `pabot` command invocation (not the screenshot's actual timestamp), format: `YYYYmmdd_HHMMSS`
|
|
428
478
|
- **ARGUMENT_INDEX** = Optional index number, only used if `--argumentfileN` options are given
|
|
429
479
|
- **PABOTQUEUEINDEX** = Process queue index (see section [Global Variables](#global-variables))
|
|
@@ -441,6 +491,7 @@ pabot_results/
|
|
|
441
491
|
│ ├── robot_stdout.out
|
|
442
492
|
│ ├── robot_stderr.out
|
|
443
493
|
│ └── artifacts...
|
|
494
|
+
pabot_manager.log # Pabot's own main log. Basically same than prints in console
|
|
444
495
|
```
|
|
445
496
|
|
|
446
497
|
Each `PABOTQUEUEINDEX` folder contains as default:
|
|
@@ -21,7 +21,7 @@ A parallel executor for [Robot Framework](http://www.robotframework.org) tests.
|
|
|
21
21
|
- [Contributing](#contributing-to-the-project)
|
|
22
22
|
- [Command-line options](#command-line-options)
|
|
23
23
|
- [PabotLib](#pabotlib)
|
|
24
|
-
- [Controlling execution order](#controlling-execution-order-and-level-of-parallelism)
|
|
24
|
+
- [Controlling execution order, mode and level of parallelism](#controlling-execution-order-mode-and-level-of-parallelism)
|
|
25
25
|
- [Programmatic use](#programmatic-use)
|
|
26
26
|
- [Global variables](#global-variables)
|
|
27
27
|
- [Output Files Generated by Pabot](#output-files-generated-by-pabot)
|
|
@@ -72,65 +72,89 @@ There are several ways you can help in improving this tool:
|
|
|
72
72
|
- Report an issue or an improvement idea to the [issue tracker](https://github.com/mkorpela/pabot/issues)
|
|
73
73
|
- Contribute by programming and making a pull request (easiest way is to work on an issue from the issue tracker)
|
|
74
74
|
|
|
75
|
+
Before contributing, please read our detailed contributing guidelines:
|
|
76
|
+
|
|
77
|
+
- [Contributing Guide](CONTRIBUTING.md)
|
|
78
|
+
- [Code of Conduct](CODE_OF_CONDUCT.md)
|
|
79
|
+
- [Security Policy](SECURITY.md)
|
|
80
|
+
|
|
75
81
|
## Command-line options
|
|
82
|
+
<!-- NOTE:
|
|
83
|
+
The sections inside these docstring markers are also used in Pabot's --help output.
|
|
84
|
+
Currently, the following transformations are applied:
|
|
85
|
+
- Remove Markdown links but keep the text
|
|
86
|
+
- Remove ** and backticks `
|
|
87
|
+
|
|
88
|
+
If you modify this part, make sure the Markdown section still looks clean and readable in the --help output. -->
|
|
89
|
+
|
|
76
90
|
<!-- START DOCSTRING -->
|
|
91
|
+
```
|
|
77
92
|
pabot [--verbose|--testlevelsplit|--command .. --end-command|
|
|
78
93
|
--processes num|--no-pabotlib|--pabotlibhost host|--pabotlibport port|
|
|
79
94
|
--processtimeout num|
|
|
80
95
|
--shard i/n|
|
|
81
96
|
--artifacts extensions|--artifactsinsubfolders|
|
|
82
|
-
--resourcefile file|--argumentfile[num] file|--suitesfrom file
|
|
97
|
+
--resourcefile file|--argumentfile[num] file|--suitesfrom file
|
|
98
|
+
--ordering <FILENAME> [static|dynamic] [skip|run_all]|
|
|
83
99
|
--chunk|
|
|
84
100
|
--pabotprerunmodifier modifier|
|
|
85
101
|
--no-rebot|
|
|
86
102
|
--help|--version]
|
|
87
103
|
[robot options] [path ...]
|
|
104
|
+
```
|
|
88
105
|
|
|
89
106
|
PabotLib remote server is started by default to enable locking and resource distribution between parallel test executions.
|
|
90
107
|
|
|
91
|
-
Supports all [Robot Framework command line options](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#
|
|
108
|
+
Supports all [Robot Framework command line options](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#command-line-options) and also following pabot options:
|
|
92
109
|
|
|
93
|
-
|
|
110
|
+
**--verbose**
|
|
94
111
|
More output from the parallel execution.
|
|
95
112
|
|
|
96
|
-
|
|
113
|
+
**--testlevelsplit**
|
|
97
114
|
Split execution on test level instead of default suite level. If .pabotsuitenames contains both tests and suites then
|
|
98
115
|
this will only affect new suites and split only them. Leaving this flag out when both suites and tests in
|
|
99
116
|
.pabotsuitenames file will also only affect new suites and add them as suite files.
|
|
100
117
|
|
|
101
|
-
|
|
118
|
+
**--command [ACTUAL COMMANDS TO START ROBOT EXECUTOR] --end-command**
|
|
102
119
|
RF script for situations where robot is not used directly.
|
|
103
120
|
|
|
104
|
-
|
|
121
|
+
**--processes [NUMBER OF PROCESSES]**
|
|
105
122
|
How many parallel executors to use (default max of 2 and cpu count). Special option "all" will use as many processes as
|
|
106
123
|
there are executable suites or tests.
|
|
107
124
|
|
|
108
|
-
|
|
125
|
+
**--no-pabotlib**
|
|
109
126
|
Disable the PabotLib remote server if you don't need locking or resource distribution features.
|
|
110
127
|
|
|
111
|
-
|
|
128
|
+
**--pabotlibhost [HOSTNAME]**
|
|
112
129
|
Connect to an already running instance of the PabotLib remote server at the given host (disables the local PabotLib
|
|
113
130
|
server start). For example, to connect to a remote PabotLib server running on another machine:
|
|
114
131
|
|
|
115
132
|
pabot --pabotlibhost 192.168.1.123 --pabotlibport 8271 tests/
|
|
116
133
|
|
|
117
|
-
The remote server can be
|
|
134
|
+
The remote server can also be started and executed separately from pabot instances:
|
|
118
135
|
|
|
119
136
|
python -m pabot.pabotlib <path_to_resourcefile> <host> <port>
|
|
120
137
|
python -m pabot.pabotlib resource.txt 192.168.1.123 8271
|
|
121
138
|
|
|
122
139
|
This enables sharing a resource with multiple Robot Framework instances.
|
|
123
140
|
|
|
124
|
-
|
|
141
|
+
Additional details:
|
|
142
|
+
- The default value for --pabotlibhost is 127.0.0.1.
|
|
143
|
+
- If you provide a hostname other than 127.0.0.1, the local PabotLib server startup is automatically disabled.
|
|
144
|
+
|
|
145
|
+
**--pabotlibport [PORT]**
|
|
125
146
|
Port number of the PabotLib remote server (default is 8270). See --pabotlibhost for more information.
|
|
126
147
|
|
|
127
|
-
|
|
148
|
+
Behavior with port and host settings:
|
|
149
|
+
- If you set the port value to 0 and --pabotlibhost is 127.0.0.1 (default), a free port on localhost will be assigned automatically.
|
|
150
|
+
|
|
151
|
+
**--processtimeout [TIMEOUT]**
|
|
128
152
|
Maximum time in seconds to wait for a process before killing it. If not set, there's no timeout.
|
|
129
153
|
|
|
130
|
-
|
|
154
|
+
**--shard [INDEX]/[TOTAL]**
|
|
131
155
|
Optionally split execution into smaller pieces. This can be used for distributing testing to multiple machines.
|
|
132
156
|
|
|
133
|
-
|
|
157
|
+
**--artifacts [FILE EXTENSIONS]**
|
|
134
158
|
List of file extensions (comma separated). Defines which files (screenshots, videos etc.) from separate reporting
|
|
135
159
|
directories would be copied and included in a final report. Possible links to copied files in RF log would be updated
|
|
136
160
|
(only relative paths supported). The default value is `png`.
|
|
@@ -139,49 +163,53 @@ Supports all [Robot Framework command line options](https://robotframework.org/r
|
|
|
139
163
|
|
|
140
164
|
--artifacts png,mp4,txt
|
|
141
165
|
|
|
142
|
-
|
|
166
|
+
The artifact naming conventions are described in the README.md section: [Output Files Generated by Pabot](#output-files-generated-by-pabot).
|
|
167
|
+
|
|
168
|
+
**--artifactsinsubfolders**
|
|
143
169
|
Copy artifacts located not only directly in the RF output dir, but also in it's sub-folders.
|
|
144
170
|
|
|
145
|
-
|
|
171
|
+
**--resourcefile [FILEPATH]**
|
|
146
172
|
Indicator for a file that can contain shared variables for distributing resources. This needs to be used together with
|
|
147
173
|
pabotlib option. Resource file syntax is same as Windows ini files. Where a section is a shared set of variables.
|
|
148
174
|
|
|
149
|
-
|
|
175
|
+
**--argumentfile[INTEGER] [FILEPATH]**
|
|
150
176
|
Run same suites with multiple [argumentfile](http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#argument-files) options.
|
|
151
177
|
|
|
152
178
|
For example:
|
|
153
179
|
|
|
154
180
|
--argumentfile1 arg1.txt --argumentfile2 arg2.txt
|
|
155
181
|
|
|
156
|
-
|
|
182
|
+
**--suitesfrom [FILEPATH TO OUTPUTXML]**
|
|
157
183
|
Optionally read suites from output.xml file. Failed suites will run first and longer running ones will be executed
|
|
158
184
|
before shorter ones.
|
|
159
185
|
|
|
160
|
-
|
|
161
|
-
Optionally give execution order from a file.
|
|
186
|
+
**--ordering [FILE PATH] [MODE] [FAILURE POLICY]**
|
|
187
|
+
Optionally give execution order from a file. See README.md section: [Controlling execution order, mode and level of parallelism](#controlling-execution-order-mode-and-level-of-parallelism)
|
|
188
|
+
- MODE (optional): [static (default)|dynamic]
|
|
189
|
+
- FAILURE POLICY (optional, only in dynamic mode): [skip|run_all (default)]
|
|
162
190
|
|
|
163
|
-
|
|
191
|
+
**--chunk**
|
|
164
192
|
Optionally chunk tests to PROCESSES number of robot runs. This can save time because all the suites will share the same
|
|
165
193
|
setups and teardowns.
|
|
166
194
|
|
|
167
|
-
|
|
195
|
+
**--pabotprerunmodifier [PRERUNMODIFIER MODULE OR CLASS]**
|
|
168
196
|
Like Robot Framework's --prerunmodifier, but executed only once in the pabot's main process after all other
|
|
169
197
|
--prerunmodifiers. But unlike the regular --prerunmodifier command, --pabotprerunmodifier is not executed again in each
|
|
170
198
|
pabot subprocesses. Depending on the intended use, this may be desirable as well as more efficient. Can be used, for
|
|
171
199
|
example, to modify the list of tests to be performed.
|
|
172
200
|
|
|
173
|
-
|
|
201
|
+
**--no-rebot**
|
|
174
202
|
If specified, the tests will execute as usual, but Rebot will not be called to merge the logs. This option is designed
|
|
175
203
|
for scenarios where Rebot should be run later due to large log files, ensuring better memory and resource availability.
|
|
176
204
|
Subprocess results are stored in the pabot_results folder.
|
|
177
205
|
|
|
178
|
-
|
|
206
|
+
**--help**
|
|
179
207
|
Print usage instructions.
|
|
180
208
|
|
|
181
|
-
|
|
209
|
+
**--version**
|
|
182
210
|
Print version information.
|
|
183
211
|
|
|
184
|
-
Example usages
|
|
212
|
+
**Example usages:**
|
|
185
213
|
|
|
186
214
|
pabot test_directory
|
|
187
215
|
pabot --exclude FOO directory_to_tests
|
|
@@ -200,6 +228,9 @@ These can be helpful when you must ensure that only one of the processes uses so
|
|
|
200
228
|
|
|
201
229
|
PabotLib Docs are located at https://pabot.org/PabotLib.html.
|
|
202
230
|
|
|
231
|
+
Note that PabotLib uses the XML-RPC protocol, which does not support all possible object types.
|
|
232
|
+
These limitations are described in the Robot Framework documentation in chapter [Supported argument and return value types](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#supported-argument-and-return-value-types).
|
|
233
|
+
|
|
203
234
|
### PabotLib example:
|
|
204
235
|
|
|
205
236
|
test.robot
|
|
@@ -245,18 +276,28 @@ pabot call using resources from valueset.dat
|
|
|
245
276
|
|
|
246
277
|
pabot --pabotlib --resourcefile valueset.dat test.robot
|
|
247
278
|
|
|
248
|
-
### Controlling execution order and level of parallelism
|
|
279
|
+
### Controlling execution order, mode, and level of parallelism
|
|
249
280
|
|
|
250
281
|
.pabotsuitenames file contains the list of suites that will be executed.
|
|
251
|
-
|
|
252
|
-
The file
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
282
|
+
This file is created during pabot execution if it does not already exist. It acts as a cache to speed up processing when re-executing the same tests.
|
|
283
|
+
The file can be manually edited partially, but a simpler and more controlled approach is to use:
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
--ordering <FILENAME> [static|dynamic] [skip|run_all]
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
- **FILENAME** – path to the ordering file.
|
|
290
|
+
- **mode** – optional execution mode, either `static` (default) or `dynamic`.
|
|
291
|
+
- `static` executes suites in predefined stages.
|
|
292
|
+
- `dynamic` executes tests as soon as all their dependencies are satisfied, allowing more optimal parallel execution.
|
|
293
|
+
- **failure_policy** – determines behavior when dependencies fail. Used only in dynamic mode. Optional:
|
|
294
|
+
- `skip` – dependent tests are skipped if a dependency fails.
|
|
295
|
+
- `run_all` – all tests run regardless of failures (default).
|
|
256
296
|
|
|
257
|
-
|
|
297
|
+
The ordering file syntax is similar to `.pabotsuitenames` but does not include the first 4 hash rows used by pabot. The ordering file defines the **execution order and dependencies** of suites and tests.
|
|
298
|
+
The actual selection of what to run must still be done using options like `--test`, `--suite`, `--include`, or `--exclude`.
|
|
258
299
|
|
|
259
|
-
|
|
300
|
+
#### Controlling execution order
|
|
260
301
|
|
|
261
302
|
There different possibilities to influence the execution:
|
|
262
303
|
|
|
@@ -268,7 +309,7 @@ There different possibilities to influence the execution:
|
|
|
268
309
|
--suite Top Suite
|
|
269
310
|
```
|
|
270
311
|
|
|
271
|
-
* If the base suite name is changing with robot option [```--name / -N```](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#setting-
|
|
312
|
+
* If the base suite name is changing with robot option [```--name / -N```](https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#setting-suite-name) you can use either the new or old full test path. For example:
|
|
272
313
|
|
|
273
314
|
```
|
|
274
315
|
--test New Suite Name.Sub Suite.Test 1
|
|
@@ -278,8 +319,14 @@ OR
|
|
|
278
319
|
|
|
279
320
|
* You can add a line with text `#WAIT` to force executor to wait until all previous suites have been executed.
|
|
280
321
|
* 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.
|
|
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.
|
|
282
|
-
|
|
322
|
+
* 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.
|
|
323
|
+
* 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.
|
|
324
|
+
* Please take care that in case of circular dependencies an exception will be thrown.
|
|
325
|
+
* 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.
|
|
326
|
+
* Ordering mode effect to execution:
|
|
327
|
+
* **Dynamic mode** will schedule dependent tests as soon as all their dependencies are satisfied. Note that in dynamic mode `#WAIT` is ignored, but you can achieve same results with using only `#DEPENDS` keywords.
|
|
328
|
+
* **Static mode** preserves stage barriers and executes the next stage only after all tests in the previous stage finish.
|
|
329
|
+
* 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.
|
|
283
330
|
* An example could be:
|
|
284
331
|
|
|
285
332
|
```
|
|
@@ -333,7 +380,7 @@ where order.txt is:
|
|
|
333
380
|
#SLEEP 8
|
|
334
381
|
```
|
|
335
382
|
|
|
336
|
-
|
|
383
|
+
Possible output could be:
|
|
337
384
|
|
|
338
385
|
```
|
|
339
386
|
2025-02-15 19:15:00.408321 [0] [ID:1] SLEEPING 6 SECONDS BEFORE STARTING Data 1.suite C
|
|
@@ -398,6 +445,12 @@ Artifacts are **copied** into the output directory and renamed with the followin
|
|
|
398
445
|
TIMESTAMP-ARGUMENT_INDEX-PABOTQUEUEINDEX
|
|
399
446
|
```
|
|
400
447
|
|
|
448
|
+
If you use the special option `notimestamps` at the end of the `--artifacts` command, (For example: `--artifacts png,txt,notimestamps`) the timestamp part will be omitted, and the name will be in the format:
|
|
449
|
+
|
|
450
|
+
```
|
|
451
|
+
ARGUMENT_INDEX-PABOTQUEUEINDEX
|
|
452
|
+
```
|
|
453
|
+
|
|
401
454
|
- **TIMESTAMP** = Time of `pabot` command invocation (not the screenshot's actual timestamp), format: `YYYYmmdd_HHMMSS`
|
|
402
455
|
- **ARGUMENT_INDEX** = Optional index number, only used if `--argumentfileN` options are given
|
|
403
456
|
- **PABOTQUEUEINDEX** = Process queue index (see section [Global Variables](#global-variables))
|
|
@@ -415,6 +468,7 @@ pabot_results/
|
|
|
415
468
|
│ ├── robot_stdout.out
|
|
416
469
|
│ ├── robot_stderr.out
|
|
417
470
|
│ └── artifacts...
|
|
471
|
+
pabot_manager.log # Pabot's own main log. Basically same than prints in console
|
|
418
472
|
```
|
|
419
473
|
|
|
420
474
|
Each `PABOTQUEUEINDEX` folder contains as default:
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=42", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[tool.pytest.ini_options]
|
|
6
|
+
python_files = ["test_*.py"]
|
|
7
|
+
python_classes = ["Test*"]
|
|
8
|
+
filterwarnings = [
|
|
9
|
+
"ignore:'robot.utils.PY2' is deprecated:DeprecationWarning:robot.utils",
|
|
10
|
+
"ignore:'robot.utils.is_unicode' is deprecated:DeprecationWarning:robot.utils",
|
|
11
|
+
"ignore::pytest.PytestCollectionWarning:module=tests.test_pabotlib",
|
|
12
|
+
]
|
|
@@ -11,12 +11,12 @@ description = Parallel test runner for Robot Framework
|
|
|
11
11
|
long_description = file: README.md
|
|
12
12
|
long_description_content_type = text/markdown
|
|
13
13
|
license = Apache License, Version 2.0
|
|
14
|
+
license_files =
|
|
14
15
|
classifiers =
|
|
15
16
|
Intended Audience :: Developers
|
|
16
17
|
Natural Language :: English
|
|
17
18
|
Programming Language :: Python :: 3
|
|
18
19
|
Topic :: Software Development :: Testing
|
|
19
|
-
License :: OSI Approved :: Apache Software License
|
|
20
20
|
Development Status :: 5 - Production/Stable
|
|
21
21
|
Framework :: Robot Framework
|
|
22
22
|
|
|
@@ -30,6 +30,8 @@ install_requires =
|
|
|
30
30
|
robotframework>=3.2
|
|
31
31
|
robotframework-stacktrace>=0.4.1
|
|
32
32
|
natsort>=8.2.0
|
|
33
|
+
license_files =
|
|
34
|
+
LICENSE
|
|
33
35
|
|
|
34
36
|
[options.packages.find]
|
|
35
37
|
where = src
|