--variable 的使用问题
pass 的例子
# robot --outputdir test_use/ --variable tname:Hello test.txt
==============================================================================
Test
==============================================================================
test | PASS |
------------------------------------------------------------------------------
Test | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
Output: /root/test/tdp.detecttest/test_use/output.xml
Log: /root/test/tdp.detecttest/test_use/log.html
Report: /root/test/tdp.detecttest/test_use/report.html
err 的例子
# robot --outputdir test_use/ test.txt --variable tname:Hello [ ERROR ] Parsing '--variable' failed: Data source does not exist.
Try --help for usage information.
[popexizhi:
太坑了,对testcase文件的顺序这么敏感,你倒是help写明白啊,但是来看一下help
94 -v --variable name:value * Set variables in the test data. Only scalar
95 variables with string value are supported and name is
96 given without `${}`. See --escape for how to use
97 special characters and --variablefile for a more
98 powerful variable setting mechanism.
99 Examples:
100 --variable str:Hello => ${str} = `Hello`
101 -v hi:Hi_World -E space:_ => ${hi} = `Hi World`
102 -v x: -v y:42 => ${x} = ``, ${y} = `42`
]
没有评论:
发表评论