Robot: Include and Exclude Tags

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值