Quantcast
Channel: Quality Center / ALM Practitioners Forum topics
Viewing all articles
Browse latest Browse all 5491

OTA VBA Preset Params in TestInstance

$
0
0

Hi,
I'd designed a few standard testcases in Testplan. These are selected one or more times in Lab.

Now I tried to write an OTA functionality in MS-Access VBA to preset the Parameters of the testcase-Instances.

For Example:

Testplan
Test1 Params ( url, user, value1, value2,...)
Test2 Params ( username, address, value1,...)
...

TestSet: MyTestSet1
[1] Test1 ( url, user, value1, value2,...) <--- "http:\Example1.de" ,"Jeff", 10, 20
[2] Test1 ( url, user, value1, value2,...) <--- "http:\Example2.de" ,"John", 11, 25
[3] Test1 ( url, user, value1, value2,...) <--- "http:\Example3.de" ,"Peter", 13, 30
[1] Test2 ( username, address, value1,...) <--- "Karl" ,44.53.22, 913
[2] Test2 ( username, address, value1,...) <--- "Wayne" ,42.34.21, 815

Here I tried to create a subroutine but I don't know th right syntax to do that.

Sub setLabParams(ActLabFolderPath As String, ActTestSet As String)

Dim TestSetTreeManager As TestSetTreeManager
Dim ParameterValFact   As StepParams

Set TestSetTreeManager = OQCConnection.TestSetTreeManager
Set tsFolder = TestSetTreeManager.NodeByPath(ActLabFolderPath)
Set TestSetList = tsFolder.FindTestSets(ActTestSet)

Set theTestSet = TestSetList(1)
Set TSTestFact = theTestSet.TSTestFactory
Set TestSetTestsList = TSTestFact.NewList("")

Inst = 1
TestName = "Test1"
InstanceName = "[" & Inst & "]" & TestName

Debug.Print "Number of Instances: " & TestSetTestsList.Count
For Each MyInstance In TestSetTestsList
  If UCase(Trim(MyInstance.Name)) = UCase(Trim(InstanceName)) Then
    Set MyTestInstance = MyInstance
    Set ParameterValFact = MyTestInstance.StepParams
    Set lst = ParameterValFact.NewList("1")
    For Each param In lst
      MsgBox param.Name
      MsgBox param.ActualValue
      param.ActualValue = ""
      'param.post
    Next
  End If
Next
End Sub

Please cn s.o help me

Thanks

kind regards

MaDeBuVie


Viewing all articles
Browse latest Browse all 5491

Trending Articles