一、用户关键字操作思路

a、创建model1资源

b、在model下创建用户关键字 - 循环

c、测试套件下创建test_case/case2 & 用户关键字

d、测试套件中导入Resource 的 model1 资源

二、对应的操作如下:

1、右键单击创建资源 -- 自定义输入name -- 小编的为 model1

2、在model上右键单击创建 user key  -- 小编定义的关键字为 add & myrange

3、 用户关键字 add 运算,使用到 Evaluate 关键字

4、用户关键字 myrange 范围

5、新建测试套件-User key--- 在User key 下创建Test case &  User Keyword

6、在 User key 测试套件中导入model 资源

7、test_case & cese2 实例截图:

8、test_case & case2 脚本如下:

*** Settings ***
Resource model.robot

*** Test Cases ***
test_case
myrange 5
${c} add 5 3
log ${c}

test_case2
[Setup] start
log this is test case
[Teardown] end

*** Keywords ***
start
log start test case

end
log end test case

9、test_case & case2 用例执行结果:

Starting test: Rf Test Pro.User Key.test_case
20190622 23:17:33.670 : INFO : 0
20190622 23:17:33.672 : INFO : 1
20190622 23:17:33.674 : INFO : 2
20190622 23:17:33.676 : INFO : 3
20190622 23:17:33.677 : INFO : 4
20190622 23:17:33.680 : INFO : ${c} = 8
20190622 23:17:33.681 : INFO : ${c} = 8
20190622 23:17:33.682 : INFO : 8
Ending test: Rf Test Pro.User Key.test_case

Starting test: Rf Test Pro.User Key.test_case2
20190622 23:17:33.685 : INFO : start test case
20190622 23:17:33.687 : INFO : this is test case
20190622 23:17:33.689 : INFO : end test case
Ending test: Rf Test Pro.User Key.test_case2

最新文章

  1. ReactJs 报错 Element type is invalid: expected a string (from built-in components) or a class/function (for composite components) but got: undefined. Check the render method of `Me`.
  2. CentOS7安装docker
  3. JS中数组的操作[转]
  4. oracle rac重建控制文件
  5. C/C++中的指针数组和数组指针
  6. python学习之路-day5-模块
  7. less 快捷操作
  8. C# 将cookiecontainer写到本地
  9. C++中#include的工作原理
  10. VxWorks6.6 pcPentium BSP 使用说明(二):创建启动盘
  11. 《阿里巴巴Java开发手册(正式版》读记
  12. WebJars
  13. spring(AOP)静态代理
  14. bzoj4520【CQOI2016】K远点对
  15. java注解的简单介绍
  16. ol3开发离线地图
  17. R中的空间数据分析
  18. level 1 -- unit 2 - what 引导的特殊疑问句
  19. vue性能优化1--懒加载
  20. WPF样式动画Trigger.EnterActions和Trigger.ExitActions(ExitActions其实可以不做任何事情)

热门文章

  1. Spring框架中 配置c3p0连接池
  2. 九度oj 题目1190:大整数排序
  3. 洛谷—— P2543 [AHOI2004]奇怪的字符串
  4. mysql性能调优——Query优化
  5. 洛谷 P2064 奇妙的汽车
  6. Ubuntu 16.04设置rc.local开机启动命令/脚本的方法(通过update-rc.d管理Ubuntu开机启动程序/服务)
  7. Eclipse编辑YAML插件-YEdit
  8. delphi异步选择模型编程TCP
  9. VC++ 提示无法打开包括文件“iostream.h”怎么办
  10. 如何在其他js 引入main.js 中 vue 的实例?