Test Framework

1.线性

input username

input password

if username == 'admin' && password == 'password' then

  pass test;

else

  failed test;

end if;

扫描二维码关注公众号,回复: 1177989 查看本文章

2.function 

function inputData(){

 ....

}

function verifyData(){

  ....

}

inputData('username')

inputData('password')

verifyData();

2.1 Data Driven

   Username    Password

   admin         admin

   root          root

   

input <Username> to username

input <Password> to password

if username == 'admin' && password == 'admin' then 

  pass test;

else

  failed test;

end if;  

3.keyword Driven

    Screen   object   action   value  comment

login    username   input   'admin'   

login    password   input   'admin'

login    loginButton click   

verify               verify

  if<Action> == input then

    input <value> to <object> 

  if<Action> == click then

    click then button

  if<Action> == verify then

    verify

  end if;

猜你喜欢

转载自sants.iteye.com/blog/2075746