从 Excel 使用 VBA 添加测试到 HP QC
add Test to HP QC From Excel With VBA
我需要将测试从 excel 导入到 hp qc 测试,这是我的:
Set TestFactory = QCconn.TestFactory
Set testObj = TestFactory.AddItem(Null)
testObj.Field("TS_USER_14") = "1" 'Arml
testObj.Field("TS_USER_01") = "TDB" 'Module
testObj.Field("TS_USER_13") = "3" 'Policy Status
testObj.Field("TS_USER_15") = "4" 'Project
testObj.Field("TS_SUBJECT") = "אוטומציה" 'Subject
testObj.Field("TS_NAME") = "ניסיון1" 'Test Name
testObj.Field("ST_DESCRIPTION") = "2"
testObj.Field("TS_RESPONSIBLE") = "zvikav" 'Designer
testObj.Field("TS_USER_12") = "6" 'Policy Type
testObj.Field("TS_USER_11") = "עדיף" ' Product154981
testObj.DesignStepFactory.Fields("DS_STEP_NAME") = "ניסיון"
testObj.Post
我可以上传测试,但我不能做测试步骤
如何上传 DesignSteps?
获取DesignStepFactory
后需要添加新项目:
' Get the DesignStepFactory from the test.
Set DSFactory = testObj.DesignStepFactory
' Create the new design step.
Set desstep = DSFactory.AddItem(Null)
' Set step properties and post step
desstep.StepName = "Step one"
desstep.StepDescription = "Do something"
desstep.StepExpectedResult = "Expect something"
desstep.Post
不确定在添加步骤之前首先 post 您的测试对象是否重要。但我相信你会发现的。
我需要将测试从 excel 导入到 hp qc 测试,这是我的:
Set TestFactory = QCconn.TestFactory
Set testObj = TestFactory.AddItem(Null)
testObj.Field("TS_USER_14") = "1" 'Arml
testObj.Field("TS_USER_01") = "TDB" 'Module
testObj.Field("TS_USER_13") = "3" 'Policy Status
testObj.Field("TS_USER_15") = "4" 'Project
testObj.Field("TS_SUBJECT") = "אוטומציה" 'Subject
testObj.Field("TS_NAME") = "ניסיון1" 'Test Name
testObj.Field("ST_DESCRIPTION") = "2"
testObj.Field("TS_RESPONSIBLE") = "zvikav" 'Designer
testObj.Field("TS_USER_12") = "6" 'Policy Type
testObj.Field("TS_USER_11") = "עדיף" ' Product154981
testObj.DesignStepFactory.Fields("DS_STEP_NAME") = "ניסיון"
testObj.Post
我可以上传测试,但我不能做测试步骤
如何上传 DesignSteps?
获取DesignStepFactory
后需要添加新项目:
' Get the DesignStepFactory from the test.
Set DSFactory = testObj.DesignStepFactory
' Create the new design step.
Set desstep = DSFactory.AddItem(Null)
' Set step properties and post step
desstep.StepName = "Step one"
desstep.StepDescription = "Do something"
desstep.StepExpectedResult = "Expect something"
desstep.Post
不确定在添加步骤之前首先 post 您的测试对象是否重要。但我相信你会发现的。