0

I am using the following code to insert a new linkTest Step in HPQC Test Plan.

Dim DSFactory, newLinkedDesignStep
Set DSFactory = objTest.DesignStepFactory
Set newLinkedDesignStep = DSFactory.AddItem(null)
newLinkedDesignStep.LinkTest = objLinkedTest
newLinkedDesignStep.Post 

The code works awesome in doing its job, but it will add the step as a last step in the existing Test Case.

My requirement is that the step should be added in the top of existing steps(As a first step) or I should be able to insert a step in the middle of two steps or I should be able to re- arrange the steps in the required order.

Will it be possible using OTA, any suggestion is much appriciated.

Thank you

Kamichetty Siva
  • 31
  • 1
  • 1
  • 6

1 Answers1

1

Below code works for inserting a step in required order.

    Set DSFactory = TestCase.DesignStepFactory
    Dim aFilter As TDFilter
    Set aFilter = DSFactory.Filter
    Set newLinkedDesignStep = DSFactory.AddItem(Null)
    newLinkedDesignStep.LinkTest = objLinkedTest(1)
    newLinkedDesignStep("DS_STEP_ORDER") = stepID (Index Starts from 0)
    newLinkedDesignStep.Post
Kamichetty Siva
  • 31
  • 1
  • 1
  • 6