51Testing软件测试论坛

标题: 请问QTP中如何启动一个test [打印本页]

作者: sstars    时间: 2006-6-6 17:56
标题: 请问QTP中如何启动一个test
我想在脚本中执行另一个Test,应该怎么做?
作者: xiaonan    时间: 2006-6-6 18:17
RunAction
作者: m_2    时间: 2006-6-7 08:50
摘自Help 文档:
Before you can use the RunAction statement in the Expert View for an external action, you must first call or copy the external action into your test by choosing Insert > Copy of Action or Call to Action. If the external action does not exist in your test, the RunAction statement is not recognized.

不知道帮你解决问题了吗?
作者: sstars    时间: 2006-6-7 09:33
楼上说的都是调用Test中的Action,我是想调用整个Test。
是不是要创建一个application对象,好像很烦,不知道怎么做。
作者: seachild    时间: 2006-6-8 09:41
step1:可以再写一个Test script (称为A),然后把你想调用的那个Test(称为 B)的每个action都在这个A里调用。就是说在A里只有一个action,这个action里只有类似 RunAction "xxxxxx", oneIteration的语句。调用action的时候可以使用插入可重用的action(前提是B里的每个action都设为可重用的),也可以使用插入action的copy。
step2:把这个A的这个action设置为可重用的.
step3:在你想调用B的Test script(称为C)里调用A的那个可重用action就OK拉!!!




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2