1. action
** qtp为每一个action生成相应的测试文件和目录,对象库也是和action绑定的。
** 用action 来划分和组织测试流程;
** 编辑action:
修改action的名字----action properties
增加action -----insert-call to new action
为action关联其他action的对象库:resources-associate repositories
(对象库是与action绑定的,这里要注意一点只有录制或者手动添加的时候,才会把对象写入库里,
如果你是把代码从一个action复制到另外一个action,那么copy到的action是不能运行的,因为没有对象。。);
** 调用其他action
2.插入检查点
** text checkpoint(固定不变的text,变化的text不能用,比如从后台取的用户名等,是可能变化的,这个时候用standard checkpoint)** standard checkpoint
**Global sheet: test-settings -run -data table interactions 设置global表数据迭代从哪行到哪行。
**local sheet: action-action call properties -run 设置action自己的local表数据迭代从哪行到哪行
4. 同时执行多个脚本 --test batch runner
** 菜单里没有test batch runner??nonono~~
选择“开始 | 所有程序 | QuickTest Professional | Tools | Test Batch Runner”启动Test Batch Runner
不过 要先确保 Tools | Options-“Allow other Mercury products to run tests and components”选项被勾选上。这里涉及到你的单个test run result保存的位置,如果2个都是temp的,那么batch执行完后,只能看到最后一个test的结果;
如果单个test run result保存的位置是默认的,则batch完后result在各自的result目录里<test folder>\res#\report。用automation-results就可以看到
**当中途stop一次,再run的时候提示:...aborded。重启test batch runner**多个test的顺序只要添加一次就会被记住,当a被删除后,再添加它的位置不变。要想改变,重启 test batch runner
5. 同时多窗口编辑action/test:??
好像就是不可以的哦
6.在函数库中创建自定义函数 insert-function definition ..
7.个人发现的诡异事件
录制回放 登录时输入框默认的值a不能直接WebEdit("userName").Set "b",要先置空:WebEdit("userName").Set "" 再WebEdit("userName").Set "b"