Anybody have a sample VB script to run all tests?
Sorry if this is in the wrong forum, I've been poring over the previous posts on this subject and most are in this forum.
Management has decided not to get HP support, so I don't have access to download runtestset.
I simply want to run my QTP tests stored in QC, one right after the other.
Does anyone have a sample script that can do this? May I have it?
Re: Anybody have a sample VB script to run all tes
This may get you started:
<font class="small">Code:</font><hr /><pre>
Set tdc = CreateObject("TDApiOle80.TDConnection")
tdc.InitConnection "http://qualitycenter/qcbin", "DEFAULT"
tdc.ConnectProject "Project_Name", user, pass
Set tsTreeMgr = tdc.TestSetTreeManager
Set TestSetFact = tdc.TestSetFactory
'Get correct test set folder (multiple test sets)
Set tSetFolder = tsTreeMgr.NodeByPath("Root\")
'Get all test sets
Set TestSetsList = tSetFolder.FindTestSets("")
'For each test set, filter on QTP Type
Set tsFilter = TestSetFact.Filter
tsFilter("TS_TYPE") = "QUICKTEST_TEST"
For Each tSet in TestSetsList
Set tsFact = tSet.TSTestFactory
Set theTSTests = tsFact.NewList(tsFilter.Text)
'If count > 0 Then Run test set
If theTSTests.Count > 0 Then
Set Scheduler = tSet.StartExecution("")
Scheduler.TdHostName = hostname
<font color="#6B6B6B">Scott Genevish