我正在努力识别代码,在HP ALM中上传每个步骤的附件。也就是说,我希望测试中的每个步骤都附加一个屏幕截图/文件。
注意:我可以附加一个运行级别的文件。
有没有人能参与进来。
发布于 2017-01-04 09:35:30
如果您已经拥有Run对象,则可以尝试执行以下操作:
Set stepFactory = yourRunObject.StepFactory
Set stepList = stepFactory.NewList("")
Set firstStep = stepList.Item(1)
Dim attachFactory As AttachmentFactory
Set attachFactory = firstStep.Attachments
Set attachment = attachFactory.AddItem (Null)
attachment.FileName = "absolute_path_of_file"
attachment.Type = TDATT_FILE
attachment.Post该代码是为运行的第一步附加一个文件的示例,但您所需做的就是为要附加的每个步骤重复该代码。
https://stackoverflow.com/questions/41373997
复制相似问题