Is there any way to use OTA to manipulate test plans in ALM?
For example, I have 350 test plans in ALM and I want to change parameter settings for each of them. It is silly to do it manually.
Update 1:
After doing research about OTA for many hours, here are what I got now:
By using codes below, I can go to a test plan and get its name, but still don't know how to get a full list of BPComponents in it...
set tdc = createobject("TDApiOle80.TDConnection")
tdc.InitConnectionEx "http://URL:8080/qcbin"
tdc.Login "Username","Password"
tdc.Connect "Domain","Project"
If tdc.Connected = true Then
print "Connect successful!!!"
End If
Set TreeMgr = tdc.TreeManager
Set SubjRoot = TreeMgr.NodeByPath("Subject\")
Set TestFact = tdc.TestFactory
Set SubjectNodeList = SubjRoot.FindChildren("", False, "")
For Each oSubjectNode In SubjectNodeList
'Print out the subject path
'Print oSubjectNode.Path
'Does this have any tests?
Set TestFilter = TestFact.Filter
TestFilter.Filter("TS_SUBJECT") = Chr(34) & oSubjectNode.Path & Chr(34)
Set TestList = TestFact.NewList(TestFilter.Text)
For Each oTest In TestList
print oTest.Name
'=============get stuck here========================
Set Components=oTest.BPComponent
Set Component=Components.Item(1)
'=============trying to get components list==========
Next
Next
This post seems provide a way to edit parameter values. But the issue is that the Test
object doesn't support Test.Load
method.
Update 2:
After more researching, I don't think we can do it through UFT/QTP. The reason is that: according to OTA official guide (link here), we need to "cast the Test
to BusinessProcess
". Seems this can't be done in VBScript because VBS doesn't have something like Dim As
or CType
.
Next step: maybe I can try to do it on test plan level but not component level?