从 hudson 实例自动运行 qtp 测试 [英] Running qtp tests automatically from a hudson instance

查看:24
本文介绍了从 hudson 实例自动运行 qtp 测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一台 Hudson 机器作为 Java Swing 项目的构建服务器.构建过程基于 Ant 脚本(而不是 Maven).

We have at work a Hudson machine that acts as a build server for a Java Swing Project. The build process is based on Ant scripts (and not Maven).

有没有人从 QuickTest Professional 集成测试是这样的配置?

Has anyone integrated tests from QuickTest Professional is such configuration?

换句话说:是否可以通过 Ant 自动执行 q​​tp 测试?

In other words: Is it possible to execute qtp tests automatically via Ant?

推荐答案

不确定您的特定设置,但 QTP 有一个自动化 API,可用于驱动 QTP 本身.下面是一个示例 VBScript 片段,您可以将其放入 .vbs 文件并从命令行调用.

Not sure about your particular setup, but QTP has an automation API which can be used to drive QTP itself. Below is an example VBScript snippet you could drop into a .vbs file and call from the command line.

Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
Dim qtTest 'As QuickTest.Test ' Declare a Test object variable

Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
qtApp.Launch ' Start QuickTest
qtApp.Visible = True ' Make the QuickTest application visible

qtApp.Open "C:\Temp\simple_test", True ' Open the test in read-only mode

' set run settings for the test
Set qtTest = qtApp.Test
qtTest.Run ' Run the test

WScript.StdOut.Write "Status is:" & qtTest.LastRunResults.Status ' Check the results of the test run
qtTest.Close ' Close the test

Set qtResultsOpt = Nothing ' Release the Run Results Options object
Set qtTest = Nothing ' Release the Test object
Set qtApp = Nothing ' Release the Application object

以下链接,集成 QTP...,描述了将 QTP 与 Ant 和 CruiseControl 集成的设置.

The following link, Integrating QTP..., describes a setup for integrating QTP with Ant and CruiseControl.

这篇关于从 hudson 实例自动运行 qtp 测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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