TDConnection Object Description An object that enables you to manage the Quality Center connection and retrieve the TDOTA object, which provides full interaction with Quality Center. Examples Connect to Quality Center Methods Connect Connects QuickTest to the Quality Center project. Disconnect Disconnects QuickTest from the Quality Center project. Properties Domain The Quality Center domain to which QuickTest is currently connected. IsConnected Indicates whether QuickTest is currently connected to Quality Center. Project The Quality Center project to which QuickTest is currently connected. Server The Quality Center server to which QuickTest is currently connected.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
TDConnection Object
Description
An object that enables you to manage the Quality Center connection and retrieve the TDOTA object, which provides full interaction with Quality Center.
Examples
Connect to Quality Center
Methods Connect Connects QuickTest to the Quality Center project.
Disconnect Disconnects QuickTest from the Quality Center project.
Properties Domain The Quality Center domain to which QuickTest is currently connected.
IsConnected Indicates whether QuickTest is currently connected to Quality Center.
Project The Quality Center project to which QuickTest is currently connected.
Server The Quality Center server to which QuickTest is currently connected.
SupportVersionControl Indicates whether the Quality Center server to which QuickTest is connected supports version control.
TDOTA Returns a TDOTA object, which exposes the Quality Center API and provides full interaction with Quality Center.
object An expression evaluating to an object of type TDConnection.
ServerURL Required. A String value. The URL address of the Web server where your Quality Center project is installed. The URL can specify a Web server accessible via a Local Area Network (LAN) or a Wide Area Network (WAN).
DomainName Required. A String value. The domain that contains the Quality Center project.
ProjectName Required. A String value. The Quality Center project to which you want to connect.
UserName Required. A String value. The user name for opening the specified project.
Password Required. A String value. The password for the specified user. You can enter the password in encrypted or unencrypted format. Confirm that the EncryptedPW property value matches the type of value you set here.
To find the encrypted value of the password, use the Password Encoder utility (Start > Programs > QuickTest Professional > Tools > Password Encoder). For more information, refer to the QuickTest Professional User's Guide.
EncryptedPW Required. A Boolean value. Indicates whether the Password property is entered in encrypted or unencrypted format.Possible values:
True--The specified password is encrypted.
False--The specified password is not encrypted.
Return ValueNone
Disconnect Method
Description
Disconnects QuickTest from the Quality Center project.
Syntax
object.Disconnect
Argument Description
object An expression evaluating to an object of type TDConnection.
Return ValueNone
Examples
Disconnect from Quality Center
Domain Property
Description
The Quality Center domain to which QuickTest is currently connected.
Possible Values True--The current Quality Center project supports version control. False--The current Quality Center project does not support version control.
Examples
Check if the Quality Center Project Supports Version Control
TDOTA Property
Description
Returns a TDOTA object, which exposes the Quality Center API and provides full interaction with Quality Center.
Syntax
object.TDOTA
Argument Description
object An expression evaluating to an object of type TDConnection.
Using the Quality Center Open Test Architecture (previously TDOTA), you can integrate your own requirement and configuration management tools, defect tracking tools, third-party and custom tools, and modeling applications.
You can:
Remotely execute tests in your testing application on multiple hosts across a network and analyze the test results from within the Quality Center environment.
Use the Quality Center COM-based API to enable your application to create, retrieve, and update Quality Center project records from within your test application environment.
For more information, refer to the Mercury Quality Center Open Test Architecture API Reference, which is supplied with your Quality Center package.
A specific file system folder path in which you want to save the results for the current test or component.
<NewLocation>--saves the run results to a new, default folder.
When working with a test in the file system or when running a component from QuickTest, the test results are saved in <QuickTest installation folder>\Tests\<TestName\<ResX>, where ResX is a unique folder name under the test folder.
When working with a test in Quality Center, the results are saved using the values from the TDRunName, TDTestInstance, and TDTestSet properties.
This option corresponds to the top radio button in the Run dialog box.
<TempLocation>--saves the run results in the <System Drive>\Temp\TempResults temporary results folder. This overwrites any results previously saved in this folder.
This option corresponds to the bottom radio button in the Run dialog box.
Remarks
If no value is specified for the the ResultsLocation property, or the property value is an empty string, then the results are saved using the same settings as the previous test run.
The folder must be new, empty, or contain only QuickTest test or component files.
object An expression evaluating to an object of type Test.
ResultsOptions Optional. A RunResultsOptions object. If no RunResultsOptions object is specified, the default value for the RunResultsOptions object is used (the results are saved in a unique folder within the test's or component's folder).
WaitOnReturn Optional. A Boolean value. Indicates whether the Test.Run statement waits until the end of the of the run before performing the next statement in the automation script. Default=True.
Note: Set this property to False only if the steps following the Test.Run statement can be performed even while the test or component is running.
Parameters Optional. A Parameters object. The Parameters collection containing the values you want to pass to the test or component.
Return ValueNone
Remarks
Note: When you run a test or business component using automation, it always runs in silent mode (whether QuickTest is visible or minimized). This means that that even if QuickTest is visible, message boxes are not opened during the run session.
Examples
Run a Test for a Specified Number of Iterations | Supply the Values of the Test Parameters for a Test Run
Parameters Collection
Description
A collection of Parameter objects.
Examples
Modify the Value of a Test Parameter in a Parameter Collection
Properties Count The number of Parameter objects in the collection.
object An expression evaluating to an object of type Test.
UpdateOptions Optional. An UpdateRunOptions object. If no UpdateRunOptions object is specified, then the default property values are used (checkpoints, Active Screen, and test object descriptions are all updated).
ResultsOptions Optional. A RunResultsOptions object. If no RunResultsOptions object is specified, the default value for the RunResultsOptions object is used (the results are saved in a unique folder within the test or component's folder).
WaitOnReturn Optional. A Boolean value. Indicates whether the Test.UpdateRun statement waits until the end of the of the run
before performing the next statement in the automation script. Default=True.
Note: Set this property to False only if the steps following the Test.UpdateRun statement can be performed even while the test or component is running.
Parameters Optional. A Parameters object. The Parameters collection containing the values you want to pass to the test or component for the update run.
'This example opens a test, configures run options and settings,'runs the test, and then checks the results of the test run.
'
'Assumptions:'There is no unsaved test currently open in QuickTest.'For more information, see the example for the Test.SaveAs method.'When QuickTest opens, it loads the add-ins required for the test.'For more information, see the example for the Test.GetAssociatedAddins method.'************************************************************************************************************************
Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
Dim qtTest 'As QuickTest.Test ' Declare a Test object variable
Dim qtResultsOpt 'As QuickTest.RunResultsOptions ' Declare a Run Results Options object variable
Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
qtApp.Launch ' Start QuickTest
qtApp.Visible = True ' Make the QuickTest application visible
'This example opens a test with predefined parameters,' gets a collection of parameter definitions, Loops on it and display each parameter details,' gets a collection of run-time parameters, change the value of one of them, run the test with parameters,' after the test run - display the value of one of the out parameters.
'
'Assumptions:' the test D:\Tests\Mytest contain in parameter called "InParam1" and out parameter called "OutParam1"'************************************************************************************************************************
Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
Dim pDefColl 'As QuickTest.ParameterDefinitions ' Declare a Parameter Definitions collection
Dim pDef ' As QuickTest.ParameterDefinition ' Declare a ParameterDefinition object
Dim rtParams 'As QuickTest.Parameters ' Declare a Parameters collection
Dim rtParam ' As QuickTest.Parameter ' Declare a Parameter object
'Dim cnt, Indx As Integer
Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
qtApp.Launch ' Start QuickTest
qtApp.Visible = True ' Make the QuickTest application visible
qtApp.Open "D:\Tests\MyTest"
' Retrieve the parameters collection defined for the test.
Set pDefColl = qtApp.Test.ParameterDefinitions
cnt = pDefColl.Count
Indx = 1
' Display the names and values of each of the parameters in the collection.