无法从 vbscript 更新测试集中的测试人员姓名

Not able to update the tester name in a Test Set from vbscript

我一直在尝试在线搜索解决方案,但由于缺乏 HP ALM 知识,我无法搜索到正确的命中标签

  Set RunFactory = tsTest.RunFactory
  Set obj_theRun = RunFactory.AddItem(CStr(testrunname))
  obj_theRun.Status = sExecutionStatus '"Passed" '-- Status to be updated
  obj_theRun.Tester = strTesterName  

此行对象获取错误不支持obj_theRun.Tester

我只想通过 vbscript 更新测试集中的测试人员列(不负责任的测试人员)。请参考最后一栏的附图(感谢 TesterAny 的帮助。在此先感谢您。

ALM 的文档说可以通过将数组作为参数传递给 AddItem 来指定测试人员名称。

https://admhelp.microfocus.com/alm/api_refs/ota/Content/ota/topic8805.html?Highlight=tester

An array consisting of the following elements:

  1. Name - The name of the run (string. required).
  2. Tester - The name of the user responsible (string. optional)
  3. Location - The host name (string. optional). The default is the host name of the current machine

因此将您的代码更改为:

Set runFactory = tsTest.RunFactory

Dim newRunArgs(3)
newRunArgs(0) = testrunname ' `testrunname` is already a string so you don't need CStr.
newRunArgs(1) = "tester name goes here"
Set newRunArgs(2) = Nothing

Set newRun = RunFactory.AddItem( newRunArgs )
newRun.Status = sExecutionStatus '"Passed" '-- Status to be updated