1、三种测试用例模式
关键字驱动(keyword-driver)、数据驱动(data-driver)、行为驱动模式(behavior-driver)
2、关键字驱动(keyword-driver)

keyword-driver demo

result
3、数据驱动(data-driver)
3.1 new source->new keyword

template keyworld
3.2 new testcase

data-drive demo

result
在模板下有两个测试用例,这两个测试用例执行都是成功的,但是在rf的同级结果中只有1条的测试用例,如果以data-drive的模式进行测试,在模板下执行的测试存在fail的测试的用例,统计失败的用例就比较困难。
4、行为驱动模式(behavior-driver)
使用 Given-When-Then 模式的行为驱动开发(BDD)。
4.1 new source->new keyword
将参数写在关键字中。

keyword
4.2 testcase

behavior-driver demo

作者:你说的啥呢
链接:http://www.jianshu.com/p/733849bda62c
來源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。