Skip to content

Commit 865d7f4

Browse files
committed
Merge branch 'fix_runner' of https://github.com/HelioGuilherme66/RIDE into HelioGuilherme66-fix_runner
2 parents b7bb7e2 + 6b29547 commit 865d7f4

File tree

1 file changed

+122
-79
lines changed

1 file changed

+122
-79
lines changed

src/robotide/contrib/testrunner/usages.py

Lines changed: 122 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
with other systems. XML outputs can also be combined and otherwise further
3333
processed with `rebot` tool. Run `rebot --help` for more information.
3434
35-
Robot Framework is open source software released under Apache License 2.0.
36-
Its copyrights are owned and development supported by Nokia Siemens Networks.
37-
For more information about the framework see http://robotframework.org.
35+
Robot Framework is open source software released under Apache License 2.0. Its
36+
copyrights are owned and development supported by Nokia Solutions and Networks.
37+
For more information about the framework see http://robotframework.org/.
3838
3939
Options
4040
=======
@@ -46,10 +46,10 @@
4646
Underscores in the documentation are converted to
4747
spaces and it may also contain simple HTML formatting
4848
(e.g. *bold* and http://url/).
49-
-M --metadata name:value * Set metadata of the top level test suite.
50-
Underscores in the name and value are converted to
51-
spaces. Value can contain same HTML formatting as
52-
--doc. Example: `--metadata version:1.2`
49+
-M --metadata name:value * Set metadata of the top level suite. Underscores
50+
in the name and value are converted to spaces. Value
51+
can contain same HTML formatting as --doc.
52+
Example: --metadata version:1.2
5353
-G --settag tag * Sets given tag(s) to all executed test cases.
5454
-t --test name * Select test cases to run by name or long name. Name
5555
is case and space insensitive and it can also be a
@@ -63,49 +63,38 @@
6363
pattern similarly as with --test and it can contain
6464
parent name separated with a dot. For example
6565
`-s X.Y` selects suite `Y` only if its parent is `X`.
66-
-i --include tag * Select test cases to run by tag. Similarly as name in
67-
--test, tag is case and space insensitive. There are
68-
three ways to include test based on tags:
69-
1) One tag as a simple pattern. Tests having a tag
70-
matching the pattern are included. Example: `it-*`
71-
2) Two or more tags (or patterns) separated by `&` or
72-
`AND`. Only tests having all these tags are included.
73-
Examples: `tag1&tag2`, `smokeANDowner-*ANDit-10`
74-
3) Two or more tags (or patterns) separated by `NOT`.
75-
Tests having the first tag but not any of the latter
76-
ones are included. Example: `it-10NOTsmoke`
66+
-i --include tag * Select test cases to run by tag. Similarly as name
67+
with --test, tag is case and space insensitive and it
68+
is possible to use patterns with `*` and `?` as
69+
wildcards. Tags and patterns can also be combined
70+
together with `AND`, `OR`, and `NOT` operators.
71+
Examples: --include foo --include bar*
72+
--include fooANDbar*
7773
-e --exclude tag * Select test cases not to run by tag. These tests are
78-
not run even if they are included with --include.
79-
Tags are excluded using the rules explained in
80-
--include.
81-
-R --runfailed output Select failed tests from an earlier output file to be
74+
not run even if included with --include. Tags are
75+
matched using the rules explained with --include.
76+
-R --rerunfailed output Select failed tests from an earlier output file to be
8277
re-executed. Equivalent to selecting same tests
8378
individually using --test option.
8479
-c --critical tag * Tests having given tag are considered critical. If no
8580
critical tags are set, all tags are critical. Tags
86-
can be given as a pattern like e.g. with --test.
81+
can be given as a pattern like with --include.
8782
-n --noncritical tag * Tests with given tag are not critical even if they
8883
have a tag set with --critical. Tag can be a pattern.
8984
-v --variable name:value * Set variables in the test data. Only scalar
90-
variables are supported and name is given without
91-
`${}`. See --escape for how to use special characters
92-
and --variablefile for a more powerful variable
93-
setting mechanism that allows also list variables.
85+
variables with string value are supported and name is
86+
given without `${}`. See --escape for how to use
87+
special characters and --variablefile for a more
88+
powerful variable setting mechanism.
9489
Examples:
95-
--variable str:Hello => ${str} = `Hello`
96-
-v str:Hi_World -E space:_ => ${str} = `Hi World`
97-
-v x: -v y:42 => ${x} = ``, ${y} = `42`
98-
-V --variablefile path * File to read variables from (e.g. `path/vars.py`).
99-
Example file:
100-
| import random
101-
| __all__ = [`scalar`, `LIST__var`, `integer`]
102-
| scalar = `Hello world!`
103-
| LIST__var = [`Hello`, `list`, `world`]
104-
| integer = random.randint(1,10)
105-
=>
106-
${scalar} = `Hello world!`
107-
@{var} = [`Hello`,`list`,`world`]
108-
${integer} = <random integer from 1 to 10>
90+
--variable str:Hello => ${str} = `Hello`
91+
-v hi:Hi_World -E space:_ => ${hi} = `Hi World`
92+
-v x: -v y:42 => ${x} = ``, ${y} = `42`
93+
-V --variablefile path * Python or YAML file file to read variables from.
94+
Possible arguments to the variable file can be given
95+
after the path using colon or semicolon as separator.
96+
Examples: --variablefile path/vars.yaml
97+
--variablefile environment.py:testing
10998
-d --outputdir dir Where to create output files. The default is the
11099
directory where tests are run from and the given path
111100
is considered relative to that unless it is absolute.
@@ -125,7 +114,6 @@
125114
similarly as --log. Default: report.html
126115
-x --xunit file xUnit compatible result file. Not created unless this
127116
option is specified.
128-
--xunitfile file Deprecated. Use --xunit instead.
129117
--xunitskipnoncritical Mark non-critical tests on xUnit output as skipped.
130118
-b --debugfile file Debug file written during execution. Not created
131119
unless this option is specified.
@@ -170,8 +158,8 @@
170158
`name` is not given, name of the combined tag is got
171159
from the specified tags. Tags are combined using the
172160
rules explained in --include.
173-
Examples: --tagstatcombine tag1ANDtag2:My_name
174-
--tagstatcombine requirement-*
161+
Examples: --tagstatcombine requirement-*
162+
--tagstatcombine tag1ANDtag2:My_name
175163
--tagdoc pattern:doc * Add documentation to tags matching given pattern.
176164
Documentation is shown in `Test Details` and also as
177165
a tooltip in `Statistics by Tag`. Pattern can contain
@@ -190,63 +178,109 @@
190178
automatically converted to spaces.
191179
Examples: --tagstatlink mytag:http://my.domain:Link
192180
--tagstatlink bug-*:http://tracker/id=%1:Bug_Tracker
193-
--removekeywords all|passed|for|wuks|name:<pattern> * Remove keyword data
194-
from the generated log file. Keywords containing
195-
warnings are not removed except in `all` mode.
196-
all: remove data from all keywords
197-
passed: remove data only from keywords in
198-
passed test cases and suites
199-
for: remove passed iterations from for
200-
loops
201-
wuks: remove all but last failing keyword
202-
from `Wait Until Keyword Succeeds`
203-
name:<pattern>: remove those keywords that matches
204-
pattern. Pattern can be the full name
205-
of the keyword with spaces removed or
206-
`*` wildcard.
181+
--removekeywords all|passed|for|wuks|name:<pattern>|tag:<pattern> *
182+
Remove keyword data from the generated log file.
183+
Keywords containing warnings are not removed except
184+
in `all` mode.
185+
all: remove data from all keywords
186+
passed: remove data only from keywords in passed
187+
test cases and suites
188+
for: remove passed iterations from for loops
189+
wuks: remove all but the last failing keyword
190+
inside `BuiltIn.Wait Until Keyword Succeeds`
191+
name:<pattern>: remove data from keywords that match
192+
the given pattern. The pattern is matched
193+
against the full name of the keyword (e.g.
194+
'MyLib.Keyword', 'resource.Second Keyword'),
195+
is case, space, and underscore insensitive,
196+
and may contain `*` and `?` as wildcards.
197+
Examples: --removekeywords name:Lib.HugeKw
198+
--removekeywords name:myresource.*
199+
tag:<pattern>: remove data from keywords that match
200+
the given pattern. Tags are case and space
201+
insensitive and it is possible to use
202+
patterns with `*` and `?` as wildcards.
203+
Tags and patterns can also be combined
204+
together with `AND`, `OR`, and `NOT`
205+
operators.
206+
Examples: --removekeywords foo
207+
--removekeywords fooANDbar*
208+
--flattenkeywords for|foritem|name:<pattern>|tag:<pattern> *
209+
Flattens matching keywords in the generated log file.
210+
Matching keywords get all log messages from their
211+
child keywords and children are discarded otherwise.
212+
for: flatten for loops fully
213+
foritem: flatten individual for loop iterations
214+
name:<pattern>: flatten matched keywords using same
215+
matching rules as with
216+
`--removekeywords name:<pattern>`
217+
tag:<pattern>: flatten matched keywords using same
218+
matching rules as with
219+
`--removekeywords tag:<pattern>`
207220
--listener class * A class for monitoring test execution. Gets
208221
notifications e.g. when a test case starts and ends.
209-
Arguments to listener class can be given after class
210-
name, using colon as separator. For example:
211-
--listener MyListenerClass:arg1:arg2
212-
--warnonskippedfiles If this option is used, skipped files will cause a
213-
warning that is visible to console output and log
214-
files. By default skipped files only cause an info
215-
level syslog message.
222+
Arguments to the listener class can be given after
223+
the name using colon or semicolon as a separator.
224+
Examples: --listener MyListenerClass
225+
--listener path/to/Listener.py:arg1:arg2
226+
--warnonskippedfiles If this option is used, skipped test data files will
227+
cause a warning that is visible in the console output
228+
and the log file. By default skipped files only cause
229+
an info level syslog message.
216230
--nostatusrc Sets the return code to zero regardless of failures
217231
in test cases. Error codes are returned normally.
218232
--runemptysuite Executes tests also if the top level test suite is
219233
empty. Useful e.g. with --include/--exclude when it
220234
is not an error that no test matches the condition.
221235
--dryrun Verifies test data and runs tests so that library
222236
keywords are not executed.
223-
--exitonfailure Stops test execution if ant critical test fails.
237+
--exitonfailure Stops test execution if any critical test fails.
238+
--exitonerror Stops test execution if any error occurs when parsing
239+
test data, importing libraries, and so on.
224240
--skipteardownonexit Causes teardowns to be skipped if test execution is
225241
stopped prematurely.
226242
--randomize all|suites|tests|none Randomizes the test execution order.
227243
all: randomizes both suites and tests
228244
suites: randomizes suites
229245
tests: randomizes tests
230246
none: no randomization (default)
231-
--runmode mode * Deprecated in version 2.8. Use individual options
232-
--dryrun, --exitonfailure, --skipteardownonexit, or
233-
--randomize instead.
247+
Use syntax `VALUE:SEED` to give a custom random seed.
248+
The seed must be an integer.
249+
Examples: --randomize all
250+
--randomize tests:1234
251+
--prerunmodifier class * Class to programmatically modify the test suite
252+
structure before execution.
253+
--prerebotmodifier class * Class to programmatically modify the result
254+
model before creating reports and logs.
255+
--console type How to report execution on the console.
256+
verbose: report every suite and test (default)
257+
dotted: only show `.` for passed test, `f` for
258+
failed non-critical tests, and `F` for
259+
failed critical tests
260+
quiet: no output except for errors and warnings
261+
none: no output whatsoever
262+
-. --dotted Shortcut for `--console dotted`.
263+
--quiet Shortcut for `--console quiet`.
234264
-W --consolewidth chars Width of the console output. Default is 78.
235265
-C --consolecolors auto|on|ansi|off Use colors on console output or not.
236266
auto: use colors when output not redirected (default)
237267
on: always use colors
238268
ansi: like `on` but use ANSI colors also on Windows
239269
off: disable colors altogether
240270
Note that colors do not work with Jython on Windows.
241-
-K --consolemarkers auto|on|off Show `.` (success) or `F` (failure) on
242-
console when top level keywords in test cases end.
243-
Values have same semantics as with --consolecolors.
271+
-K --consolemarkers auto|on|off Show markers on the console when top level
272+
keywords in a test case end. Values have same
273+
semantics as with --consolecolors.
274+
--monitorwidth chars Deprecated. Use --consolewidth instead.
275+
--monitorcolors colors Deprecated. Use --consolecolors instead.
276+
--monitormarkers value Deprecated. Use --consolemarkers instead.
244277
-P --pythonpath path * Additional locations (directories, ZIPs, JARs) where
245-
to search test libraries from when they are imported.
246-
Multiple paths can be given by separating them with a
247-
colon (`:`) or using this option several times. Given
248-
path can also be a glob pattern matching multiple
249-
paths but then it normally must be escaped or quoted.
278+
to search test libraries and other extensions when
279+
they are imported. Multiple paths can be given by
280+
separating them with a colon (`:`) or by using this
281+
option several times. Given path can also be a glob
282+
pattern matching multiple paths but then it normally
283+
must be escaped or quoted.
250284
Examples:
251285
--pythonpath libs/
252286
--pythonpath /opt/testlibs:mylibs.zip:yourlibs
@@ -285,7 +319,13 @@
285319
286320
Options that are marked with an asterisk (*) can be specified multiple times.
287321
For example, `--test first --test third` selects test cases with name `first`
288-
and `third`. If other options are given multiple times, the last value is used.
322+
and `third`. If an option accepts a value but is not marked with an asterisk,
323+
the last given value has precedence. For example, `--log A.html --log B.html`
324+
creates log file `B.html`. Options accepting no values can be disabled by
325+
using the same option again with `no` prefix added or dropped. The last option
326+
has precedence regardless of how many times options are used. For example,
327+
`--dryrun --dryrun --nodryrun --nostatusrc --statusrc` would not activate the
328+
dry-run mode and would return normal status rc.
289329
290330
Long option format is case-insensitive. For example, --SuiteStatLevel is
291331
equivalent to but easier to read than --suitestatlevel. Long options can
@@ -296,6 +336,8 @@
296336
Environment Variables
297337
=====================
298338
339+
ROBOT_OPTIONS Space separated list of default options to be placed
340+
in front of any explicit options on the command line.
299341
ROBOT_SYSLOG_FILE Path to a file where Robot Framework writes internal
300342
information about parsing test case files and running
301343
tests. Can be useful when debugging problems. If not
@@ -323,7 +365,8 @@
323365
# Executing multiple test case files and using case-insensitive long options.
324366
$ pybot --SuiteStatLevel 2 /my/tests/*.html /your/tests.html
325367
326-
# Setting syslog file before running tests.
368+
# Setting default options and syslog file before running tests.
369+
$ export ROBOT_OPTIONS="--critical regression --suitestatlevel 2"
327370
$ export ROBOT_SYSLOG_FILE=/tmp/syslog.txt
328371
$ pybot tests.tsv
329372
"""

0 commit comments

Comments
 (0)