Question

I got a piece of code in vbscript to add parameter to a test case but it throws following error
Entity with Key '5' does not exist in table 'TEST'

VBSCRIPT:

Dim supportParamTest
Set supportParamTest = TDConnection.TestFactory.Item(5)
Set testParamsFactory = supportParamTest.TestParameterFactory
Set parameter = testParamsFactory.AddItem(Null)
parameter.Name = "name"
parameter.Description = "desc"
parameter.Post

Can anyone help me out?

Was it helpful?

Solution

You specifically asked for the TestFactory managed item whose id is '5' (line 2 of your code). The error tells you that there is no such entity with this id.

Did you mean to get item 5? If yes, are you connected to the right project?

You can check the entity IDs using the Admin feature that lets you run SQL directly against the HPQC project database. Do a SELECT * FROM TEST and see whether there is a row whose id is 5.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top