QCUtil Object
Description
The object used to access the OpenText Application Quality Management Open Test Architecture (OTA) API interface. You can use the properties associated with the QCUtil object to return OTA objects. You can use the returned object to perform any OTA property or method supported for that object.
For details on the objects, properties, and methods supported for the returned objects exposed by the QCUtil object, see the ALM Open Test Architecture API Reference.
Note: This object replaces the TDUtil object used in earlier versions of QuickTest. The TDUtil object is supported for backwards compatibility only. We recommend updating your tests to use the QCUtil object.
Properties
![]() | Returns the OTA Run object, which represents the current run. |
![]() | Returns the OTA Test object, which represents a planning test. |
![]() | Returns the OTA TestSet object, which represents a group of tests. |
![]() | Returns the OTA TSTest object, which represents an execution instance. |
![]() | Indicates whether OpenText Functional Testing is currently connected to an ALM project. |
![]() | Returns the OTA QCConnection object, which represents the current ALMsession and provides access to the ALMobject model. |
Run Property
Description
Returns the OTA Run object, which represents the current run. For more details, see the ALM Open Test Architecture API Reference.
Syntax
QCUtil.CurrentRun
Return Value
An OTA Run object.

This example returns the current test run results and reports the ALMrun name to the OpenText Functional Testing run results.
dim CurrentRun
set CurrentRun = QCUtil.CurrentRun
Reporter.ReportEvent 2,"Current Run", CurrentRun.Name
CurrentTest Property
Description
Returns the OTA Test object, which represents a planning test. For more details, see the ALM Open Test Architecture API Reference.
Note: This property is supported only when OpenText Functional Testing is connected to OpenText Application Quality Management and the test is saved in an ALM project
Syntax
QCUtil.CurrentTest
Return Value
An OTA Test object.

This example returns the planning test and reports its name to the run results.
dim CurrentTest
set CurrentTest = QCUtil.CurrentTest
Reporter.ReportEvent 2,"Current Test", CurrentTest.Name
CurrentTestSet Property
Description
Returns the OTA TestSet object, which represents a group of tests. For more details, see the ALM Open Test Architecture API Reference.
Note: This property is supported only when OpenText Functional Testing is connected to OpenText Application Quality Management and the run results location is an ALMlocation.
Syntax
QCUtil.CurrentTestSet
Return Value
An OTA TestSet object.

This example returns the test set of the current test run and reports its name to the run results.
dim CurrentTSTest
set CurrentTSTest = QCUtil.CurrentTestSet
Reporter.ReportEvent 2,"Current TestSet", CurrentTSTest.Name
CurrentTestSetTest Property
Description
Returns the OTA TSTest object, which represents an execution instance. For more details, see the ALM Open Test Architecture API Reference.
Note: This property is supported only when OpenText Functional Testing is connected to OpenText Application Quality Management.
Syntax
QCUtil.CurrentTestSetTest
Return Value
An OTA TSTest object.

This example returns the execution test and reports its name to the run results.
Dim CurrentTSTestSet
set CurrentTSTestSet = QCUtil.CurrentTestSetTest
Reporter.ReportEvent 2,"Current TestSet Test", CurrentTSTestSet.Name
IsConnected Property
Description
Indicates whether OpenText Functional Testing is currently connected to an ALM project.
Note: Returns False if OpenText Functional Testing is connected to an ALM server, but not connected to any project.
Tip: We recommend inserting a IsConnected step before other ALMoperations.
Syntax
QCUtil.IsConnected
Return Value
Boolean

This example checks whether OpenText Functional Testing is currently connected to an ALM project. If it is, then it reports information about the current server, project, and domain name to the run results. Otherwise it reports a message that OpenText Functional Testing is not connected to OpenText Application Quality Management.
if QCUtil.IsConnected then
Reporter.ReportEvent 0, "Connected", "Connected to server: " + QCUtil.QCConnection.ServerName + chr (13) +"Project: " + QCUtil.QCConnection.ProjectName + chr (13) + "Domain: " + QCUtil.QCConnection.DomainName
else
Reporter.ReportEvent 1, "Not connected", "Not connected to ALM"
end if
QCConnection Property
Description
Returns the OTA QCConnection object, which represents the current ALMsession and provides access to the ALMobject model.
For more details, see the Open Test Architecture (OTA) API Reference, in the OpenText Application Quality Management Help Center.
Note: This property is supported only when OpenText Functional Testing is connected to OpenText Application Quality Management.
Syntax
QCUtil.QCConnection
Return Value
An OTA QCConnection object.

This example reports a defect to the ALMdatabase and enters values for the Status, Summary and Detected By fields.
Dim QCConnection
Set QCConnection = QCUtil.QCConnection
'Get the IBugFactory
Set BugFactory = QCConnection.BugFactory
'Add a new, empty defect
Set Bug = BugFactory.AddItem (Nothing)
'Enter values for required fields
Bug.Status = "New"
Bug.Summary = "New defect"
Bug.DetectedBy = "admin" ' user that must exist in the database's user list
'Post the bug to the database ( commit )
Bug.Post
See also:
- Crypt Object
- DataTable Object
- Description Object
- DeviceReplay Object
- DotNetFactory Object
- DTParameter Object
- DT Sheet Object
- Environment Object
- Extern Object
- Parameter Object
- JSON Object
- JsonUtil Object
- MercuryTimers Object (Collection)
- MercuryTimer Object
- NV Object
- OptionalStep Object
- ParallelUtil Object
- LocalParameter Object
- PasswordUtil Object
- PathFinder Object
- PDFUtil Object
- Properties Object (Collection)
- QCUtil Object
- RandomNumber Object
- Recovery Object
- Remote Connection Object
- Reporter Object
- RepositoriesCollection Object
- Repository Object
- Services Object
- Setting Object
- SystemMonitor Object
- TestArgs Object
- TextUtil Object
- UIAutomation Object
- VisualRelation Object
- VisualRelations Object
- VisualRelationsCollection Object
- WebUtil Object
- XMLUtil Object