Running qtp tests automatically from a hudson instance

We are working on a Hudson machine, which acts as the build server for the Java Swing Project. The build process is based on Ant scripts (not Maven).

Has anyone integrated tests from QuickTest Professional into such a configuration?

In other words: is it possible to run qtp tests automatically through Ant?

+1
source share
2 answers

Not sure about your specific setup, but QTP has an automation API that you can use to manage QTP. The following is an example of a VBScript snippet that you can write to a .vbs file and invoke 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.

+2

, . QTP Hudson:

  • VBScript (.vbs), QTP
  • vbs , , , , ..
  • Hudson invoke shell vbs QTP
  • HTML
  • HTML- Hudson
  • Hudson Dashboard
+1

Source: https://habr.com/ru/post/1713226/


All Articles