我能确定是否当前组件将ALM的测​​试实验室执行,或交互? [英] Can I determine whether current component is executed from ALM's test lab, or interactively?

查看:351
本文介绍了我能确定是否当前组件将ALM的测​​试实验室执行,或交互?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能确定(编程)如何我现在的业务组件脚本code已经启动?

这可能是


  • 独立的(使用运行,从UFT的工具栏,而部分是打开的)

  • 从一个独立的测试执行(同时测试调用组件使用运行,从UFT的工具栏是打开的)

  • (使用运行或运行所有测试集中IM ALM按钮)
  • 从测试实验室执行?

Foggily相关:<一href=\"http://stackoverflow.com/questions/4157054/can-i-determine-if-current-test-execs-from-test-lab-or-interactively-from-within\">Can我确定是否从测试实验室或交互从QTP IDE中电流测试的高管?

Foggily related: Can I determine if current test execs from test lab or interactively from within QTP IDE?

推荐答案

如果执行独立的组件,的CreateObject(QuickTest.Application)。CurrentDocumentType 收益业务组件

If the component is executed standalone, CreateObject ("QuickTest.Application").CurrentDocumentType returns "Business component".

如果该组件是从BPT(如果BPT是一考定中交互执行,或不管) CurrentDocumentType 收益中执行 测试

If the component is executed from within a BPT (no matter if the BPT is executed interactively, or from within a test set) CurrentDocumentType returns "Test".

与败露了相关的问题(和答案)的设置相结合,这个答案。就这么简单。

Combined with the setting brought to light in the related question (and answer), this answers the question. It's as simple as that.

这篇关于我能确定是否当前组件将ALM的测​​试实验室执行,或交互?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆