Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to Execute a testset from QC using OTA framework
#1
Not Solved
Code:
Dim TSetFact, tsList
Dim theTestSet
Dim tsTreeMgr
Dim tsFolder
Dim Scheduler
Dim execStatus
Dim tdc
Dim nPath
Dim TSTestFact, testList
Dim tsFilter
Dim TSTst

Set tdc = CreateObject("TDAPIOLE80.TDConnection")
If (tdc Is Nothing) Then
MSGBOX  "Connection is not created"
Else
MSGBOX "Connection is created"
End If
tdc.InitConnectionEx "http://qctest:8080/qcbin"
tdc.Login "Username", ""
tdc.Connect "STD", "Projectname"


Set TSetFact = tdc.TestSetFactory
Set tsTreeMgr = tdc.TestSetTreeManager
nPath = "Root\" & Trim("Bui\testset")
MSGBOX nPath
Set tsFolder = tsTreeMgr.NodeByPath(nPath)

If (tsFolder Is Nothing) Then
MSGBOX  "Folder is not found"
Else
MSGBOX "Folder is found"
End If

Set tsList = tsFolder.FindTestSets("Phase")
If tsList.Count > 0 Then
MSGBOX "FindTestSets found more than one test set"
ElseIf tsList.Count < 1 Then
MSGBOX "FindTestSets: test set not found"
End If

Set theTestSet = tsList.Item(1)

'MSGBOX theTestSet.ID
'Set TSTestFact = theTestSet.TSTestFactory
'Set tsFilter = TSTestFact.Filter
'tsFilter.Filter("TC_CYCLE_ID") = theTestSet.ID
'Set testList = TSTestFact.NewList(tsFilter.Text)
'For Each TSTst In testList
'MSGBOX "Name: " & TSTst.Name & " ID: " & TSTst.ID
Set Scheduler = theTestSet.StartExecution("")
Scheduler.RunAllLocally = True
Scheduler.Run
Set execStatus = Scheduler.ExecutionStatus
'MSGBOX  execStatus
'Next

set obj = theTestSet.StartExecution("LocalHost")
obj.RunAllLocally = True
obj.Run()


Set tdc = Nothing


how to select a particular test set and execute it using OTA FRAMEWORK

I have written the above code however i am unable to find out ..how to select the test set and start execution

please help
Reply


Messages In This Thread
How to Execute a testset from QC using OTA framework - by AutomationTester2011 - 09-06-2011, 03:51 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Execute button of putton won't be clicke automaticly in UFT (VB) MarUFT 3 2,442 11-21-2016, 04:22 PM
Last Post: Ankur
  Not able to execute script shanthalaAR 0 1,934 06-27-2015, 03:53 AM
Last Post: shanthalaAR
  Is there a possible way to execute sql in QTP using 'WITH' clause shruthic 0 2,984 04-26-2014, 11:42 PM
Last Post: shruthic
  Execute scripts sherst 0 2,825 01-11-2013, 01:46 AM
Last Post: sherst
  execute file rjkmr.aiht 6 4,979 05-16-2012, 03:09 PM
Last Post: rjkmr.aiht

Forum Jump:


Users browsing this thread: 1 Guest(s)