Robot: Include and Exclude Tags

来源:互联网 发布:地理信息系统算法试卷 编辑:程序博客网 时间:2024/06/03 18:12

Include and Exclude Tags in Command Line

Tags Patterns

Most tag related options accept arguments as tag patterns. They have allthe same characteristics as simple patterns, but they also support AND, OR andNOT operators explained below. These operators can be used for combining two ormore individual tags or patterns together.

 

 

 

AND or &

The whole pattern matches if all individual patterns match. AND and & are equivalent.
--include fooANDbar     # Matches tests containing tags 'foo' and 'bar'.
--exclude xx&yy&zz      # Matches tests containing tags 'xx', 'yy', and 'zz'.

OR

The whole pattern matches if any individual pattern matches.
--include fooORbar      # Matches tests containing either tag 'foo' or tag 'bar'.
--exclude xxORyyORzz    # Matches tests containing any of tags 'xx', 'yy', or 'zz'.

NOT

The whole pattern matches if the pattern on the left side matches but the one on the right side does not. If used multiple times, none of the patterns after the first NOT must not match.
--include fooNOTbar     # Matches tests containing tag 'foo' but not tag 'bar'.
--exclude xxNOTyyNOTzz  # Matches tests containing tag 'xx' but not tag 'yy' or tag 'zz'.

Mixed

The above operators can also be used together. The operator precedence, from highest to lowest, is AND, OR and NOT.
--include xANDyORz      # Matches tests that contain either tags 'x' and 'y', or tag 'z'
--include xORyNOTz      # Matches tests that contain either tag 'x' or 'y', but not tag 'z'.
--include xNOTyANDz     # Matches tests that contain tag 'x', but not tags 'y' and 'z'.

 

 

Include and Exclude Tags inExecution

-i, --include <tag>

 

Selects the test cases by tag.

-e, --exclude <tag>

 

Selects the test cases by tag.

Command example:

pybot -v RootTarget:D:\Rwbot -vProductTarget:D:\Rwbot\targets\ap_qa_auto --variablefiletargets/ap_qa_auto/resources/variables/VAR_ZF7982.py --include"2g&mcast"targets/ap_qa_auto/testsuites/qos
pybot -vRootTarget:D:\Rwbot -v ProductTarget:D:\Rwbot\targets\ap_qa_auto --variablefiletargets/ap_qa_auto/resources/variables/VAR_ZF7982.py --include"2gANDmcast"targets/ap_qa_auto/testsuites/qos

python ./bin/rwbot--pybot-opts="-V resources/variables/VAR_ZF7982.py --include 5g&mcast"run-target ap_qa_auto qos

Include andExclude Tags in Statistic Report

--tagstatinclude <tag>

 

Includes only these tags in the Statistics by Tag table.

--tagstatexclude <tag>

 

Excludes these tags from the Statistics by Tag table.

--tagstatcombine <tags:title>

 

Creates combined statistics based on tags.

Command example:

python ./bin/rwbot --pybot-opts="-Vresources/variables/VAR_ZF7982.py--tagstatexcludeTLID-*" run-target ap_qa_auto hotspot

pybot -v RootTarget:D:\Rwbot--tagstatexclude TLID-* -o output1.xml -l log1.html -rreport1.html targets/ap_qa_auto/testsuites/ap_test.robot

0 0
原创粉丝点击