1.线性
input username
input password
if username == 'admin' && password == 'password' then
pass test;
else
failed test;
end if;
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;