質問

私たちは、Java Swing プロジェクトのビルド サーバーとして機能する Hudson マシンを職場に持っています。ビルド プロセスは (Maven ではなく) Ant スクリプトに基づいています。

QuickTest Professional の統合テストがそのような構成になっている人はいますか?

言い換えると:Ant 経由で QTP テストを自動的に実行することはできますか?

役に立ちましたか?

解決

あなたの特定のセットアップわからないが、QTPは、QTP自体を駆動するために使用することができ、自動化APIを持っています。以下は、VBScriptのは、あなたが.vbsファイルにドロップすると、コマンドラインから呼び出すことができスニペット例があります。

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

次のリンク、<のhref = "http://www.softwareinquisition.com/2006/06/integrating-qtp-with-non-mercury-products" のrel = "nofollowをnoreferrer" タイトル= "QTPの統合。 .. "> QTPの統合... に、AntとCruiseControlのでQTPを統合するための設定について説明します。

他のヒント

はい、可能です。QTP を Hudson と統合する手順を提供します。

  1. QTP を呼び出す VBScript (.vbs) ファイルを作成します。
  2. この vbs ファイルは、アドイン、オブジェクト リポジトリ、ライブラリの追加、環境変数の読み込みなどのすべての構成を行う必要があります。
  3. Hudson 構成では、シェルを呼び出して vbs ファイルをコマンド ライン引数として渡し、QTP を呼び出してテストを実行します。
  4. 結果を HTML 形式で生成する
  5. Hudson の HTML レポート プラグインを使用する
  6. Hudson ダッシュボードに結果を表示する
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top