RobotFramework框架系列–运⾏参数篇我们前⽂说了,RF有很强⼤的参数运⾏
rebot –help 可以得到如下的Option,我把常⽤的黄⾊标注,当然⼤家可以根据实际使⽤中进⾏选择
Options
=======
-R --merge When combining results, merge outputs together
instead of putting them under a new top level suite.
Example: rebot --l
-N --name name Set the name of the top level test suite. Underscores
in the name are converted to spaces. Default name is
created from the name of the executed data source.
-D --doc documentation Set the documentation of the top level test suite.
Underscores in the documentation are converted to
spaces and it may also contain simple HTML formatting
(e.g. *bold* and ).
-M --metadata name:value * Set metadata of the top level suite. Underscores
in the name and value are converted to spaces. Value
can contain same HTML formatting as --doc.
Example: --metadata version:1.2
-G --ttag tag * Sets given tag(s) to all executed test cas.
-t --test name * Select test cas by name or long name. Name is ca
and space innsitive and it can also be a simple
pattern where `*` matches anything and `?` matches
any char. If using `*` and `?` in the console is
problematic, e --escape and –argumentfile.
⽀持通配符 ⽐如 “--test Example* ”就是以Example的ca名称全部被选中
-s --suite name * Select test suites by name. When this option is ud
with --test, --include or --exclude, only test cas
in matching suites and also matching other filtering
criteria are lected. Given name can be a simple
pattern similarly as with --test.
-i --include tag * Select test cas to by tag. Similarly as name with
--test, tag is ca and space innsitive and it is
possible to u patterns with `*` and `?` as
wildcards. Tags and patterns can also be combined
together with `AND`, `OR`, and `NOT` operators.
Examples: --include foo --include bar*
--include fooANDbar*
-e --exclude tag * Select test cas not to be included by tag. The
tests are not lected even if included with
--include. Tags are matched using the rules explained
with --include.
--procesmptysuite Process output also if the top level test suite is empty. with --include/--exclude when it
is not an error that no test matches the condition.
-
c --critical tag * Tests having given tag are considered critical. If no critical tags are t, all tags are critical. Tags
can be given as a pattern like with --include.
-n --noncritical tag * Tests with given tag are not critical even if they have a tag t with --critical. Tag can be a pattern.
-d --outputdir dir Where to create output files. The default is the directory where Rebot is run from and the given path
is considered relative to that unless it is absolute.
所得税会计分录
-o --output file XML output file. Not created unless this option is specified. Given path, similarly as paths given to
--log, --report and --xunit, is relative to
--outputdir unless given as an absolute path.
-l --log file HTML log file. Can be disabled by giving a special
name `NONE`. Default: log.html
Examples: `--log mylog.html`, `-l none`
-r --report file HTML report file. Can be disabled with `NONE`
similarly as --log. Default: report.html
-x --xunit file xUnit compatible result file. Not created unless this
option is specified.
--xunitskipnoncritical Mark non-critical tests on xUnit output as skipped. -T --timestampoutputs When this option is ud, timestamp in a format `YYYYMMDD-hhmmss` is added to all generated output
files between their baname and extension. For
example `-T -l -r report.html -l none`
creates files like `l` and
`report-20070503-154410.html`.
--splitlog Split log file into smaller pieces that open in
browr transparently.
--logtitle title Title for the generated test log. The default title
is `<Name Of The Suite> Test Log`. Underscores in
the title are converted into spaces in all titles.
--reporttitle title Title for the generated test report. The default
title is `<Name Of The Suite> Test Report`.
--reportbackground colors Background colors to u in the report file. Either `all_pasd:critical_pasd:failed` or
`pasd:failed`. Both color names and codes work.
Examples: --reportbackground green:yellow:red
--reportbackground #00E:#E00
-L --loglevel level Threshold for lecting messages. Available levels: TRACE (default), DEBUG, INFO, WARN, NONE (no msgs).
U syntax `LOGLEVEL:DEFAULT` to define the default
visible log level in log files.
Examples: --loglevel DEBUG
--loglevel DEBUG:INFO
--suitestatlevel level How many levels to show in `Statistics by Suite`
in log and report. By default all suite levels are
shown. Example: --suitestatlevel 3
--tagstatinclude tag * Include only matching tags in `Statistics by Tag` and `Test Details` in log and report. By default all
tags t in test cas are shown. Given `tag` can
also be a simple pattern ( --test).
--tagstatexclude tag * Exclude matching tags from `Statistics by Tag` and `Test Details`. This option can be ud with
--tagstatinclude similarly as --exclude is ud with
--include.
--tagstatcombine tags:name * Create combined statistics bad on tags.
The statistics are added into `Statistics by Tag`
and matching tests into `Test Details`. If optional
`name` is not given, name of the combined tag is got
from the specified tags. Tags are combined using the
rules explained in --include.
Examples: --tagstatcombine requirement-*
--tagstatcombine tag1ANDtag2:My_name
--tagdoc pattern:doc * Add documentation to tags matching given pattern. Documentation is shown in `Test Details` and also as
a tooltip in `Statistics by Tag`. Pattern can contain
characters `*` (matches anything) and `?` (matches
any char). Documentation can contain formatting紫薯糯米糕
我要等着你similarly as with --doc option.
Examples: --tagdoc mytag:My_documentation
以色列伊朗--tagdoc regression:*See*_info.html
--tagdoc owner-*:Original_author
--tagstatlink pattern:link:title * Add external links into `Statistics by
Tag`. Pattern can contain characters `*` (matches
anything) and `?` (matches any char). Characters
matching to wildcard expressions can be ud in link
and title with syntax %N, where N is index of the
match (starting from 1). In title underscores are
automatically converted to spaces.
Examples: --tagstatlink mytag:
--tagstatlink bug-*:
--removekeywords all|pasd|for|wuks|name:<pattern>|tag:<pattern> * Remove keyword data from all generated outputs.
Keywords containing warnings are not removed except
in `all` mode.
all: remove data from all keywords
pasd: remove data only from keywords in pasd
test cas and suites
for: remove pasd iterations from for loops
wuks: remove all but the last failing keyword
inside `BuiltIn.Wait Until Keyword Succeeds`
name:<pattern>: remove data from keywords that match
the given pattern. The pattern is matched
against the full name of the keyword (e.g.
'MyLib.Keyword', 'resource.Second Keyword'),
is ca, space, and underscore innsitive,
and may contain `*` and `?` as wildcards.
名人的读书方法
Examples: --removekeywords name:Lib.HugeKw
--removekeywords name:myresource.*
tag:<pattern>: remove data from keywords that match
the given pattern. Tags are ca and space
innsitive and it is possible to u
patterns with `*` and `?` as wildcards.
螳螂的特点Tags and patterns can also be combined
together with `AND`, `OR`, and `NOT`
家用空调功率operators.
Examples: --removekeywords foo
--removekeywords fooANDbar*
-
-flattenkeywords for|foritem|name:<pattern>|tag:<pattern> *
Flattens matching keywords in all generated outputs.
脉搏多少算正常
Matching keywords get all log messages from their
child keywords and children are discarded otherwi.
for: flatten for loops fully
foritem: flatten individual for loop iterations
name:<pattern>: flatten matched keywords using same
matching rules as with
`--removekeywords name:<pattern>`
tag:<pattern>: flatten matched keywords using same
matching rules as with
`--removekeywords tag:<pattern>`
--starttime timestamp Set starting time of test execution when creating reports. Timestamp must be given in format
`2007-10-01 15:12:42.268` where all parators are
optional (e.g. `20071001151242268` is ok too) and