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

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

问题描述

我们在工作中有哈德森机充当一个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).

有没有人综合测试是这样的配置?

Has anyone integrated tests from QuickTest Professional is such configuration?

在换句话说:是否有可能通过Ant自动执行QTP测试

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 ... ,描述了使用Ant和CruiseControl的集成QTP一个设置。

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

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

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