机器人框架,即使有任何失败,如何继续测试用例

Sen*_*gam 3 robotframework

我是Robot的新手,正在学习编写逻辑和测试用例.

我有一个测试套件,monitor.robot,它有很多测试用例.主页web1,主页web2,主页web3等测试用例.如果任何步骤失败,那么执行不应该停止,应该继续直到事务结束?

monitoring.robot

Test Case## Heading ##
echo Trans01_WebSites-helloPublicWebsite
open    https://www.morganre.com/
assertTitle    abcd  Group | abcd 
echo    Trans02_WebSites-CorporateSolutions
open    https://corporatesolutions.hello.com/
assertTitle    abcd  Corporate Solutions
echo    Trans03_WebSites-OpenMinds
open    https://openminds.hello.com/
assertTitle    abcd  - Open Minds
echo    Trans04_WebSites-Arthello
open    http://art.hello.com/
assertTitle    Art at abcd 
close    win_ser_local
Close All Browsers
Run Code Online (Sandbox Code Playgroud)

即使在任何测试用例中发生任何故障,也不应停止的执行.

小智 6

Robot Framework有用的方法:

  1. Run Keyword And Continue On Failure open https://www.morganre.com/
  2. Run Keyword And Ignore Error open https://www.morganre.com/

两者都可以,但第一个将显示失败状态的失败方法,第二个将忽略错误.

有关详细信息,请参阅http://robotframework.org/robotframework/latest/libraries/BuiltIn.html