RobotFramework用例執行的幾種命令


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

   執行結果:

   

 

 

  

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM