1.指定robot文件(套件文件)
執行命令:
robot test.robot
2.指定整個套件目錄,會執行目錄下所有的測試用例
執行命令:
robot testcase
3.當引用外部文件(包括資源文件和py測試庫文件)
還是使用命令:robot testcase
報錯: Error in file 'D:\iTools\spj\testcase\test2.robot': Resource file 'rflib\rcfile.robot' does not exist.
解決方法:
執行命令:
robot -P . testcase 或robot --pythonpath . testcase
4.套件目錄下,指定用例執行
執行命令:【其中*是模糊匹配】
robot -P . -t *Lara testcase 或者robot -P . --test *Lara testcase
5.指定套件下的子套件中的用例
我想執行套件suite1下的子套件st1的所有用例
執行命令:
robot -s st1 suite1 或robot --suite st1 suite1
執行結果: