renumbering steps (888 Views)
Reply
Occasional Advisor
nithyaseelan
Posts: 10
Registered: ‎04-16-2008
Message 1 of 7 (888 Views)

renumbering steps

IN QC,as I add on steps the step name defaults to step 1,step 2,step 3 and so on.I renamed it as 1,2,3 ...
Wont the Renumber steps button work on this case?

Will 'Renumber step' work only if I leave the deafult 'step name' values as it is?
Trusted Contributor
CARTMAN_1
Posts: 153
Registered: ‎04-10-2008
Message 2 of 7 (888 Views)

Re: renumbering steps

Yes you are right .The 'Renumber step' works only if you leave the default 'step name' values as it is.
I spoke to Mercury Customer Service (before HP merger) and they gave the same answer .
Occasional Advisor
nithyaseelan
Posts: 10
Registered: ‎04-16-2008
Message 3 of 7 (888 Views)

Re: renumbering steps

thanks skrishna for confirming this
Honored Contributor
john scarpino
Posts: 1,344
Registered: ‎02-15-2008
Message 4 of 7 (888 Views)

Re: renumbering steps

Yes once you rename it! The Renumber does not pick up.
Honored Contributor
Jan Czajkowski
Posts: 2,113
Registered: ‎12-12-2007
Message 5 of 7 (888 Views)

Re: renumbering steps

If you add a descriptive suffix to the default step name, using the Renumber Steps button will have some interesting effects that could actually be utilized. Try the following.

This is after having rearranged the steps but before clicking the Renumber Steps button:

Step 1 First step
Step 3 Second step
Step 2 Third step

This is what happens with the step name after clicking the Renumber Steps button:

Step 1 First step
Step 2 Second step
Step 3 Third step

What happens is the default part of the step name (e.g. Step 2) is renumbered, but the suffix is preserved in its original position.
Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
Occasional Advisor
nithyaseelan
Posts: 10
Registered: ‎04-16-2008
Message 6 of 7 (888 Views)

Re: renumbering steps

This is interesting..I never tried this.Thanks Jan
Valued Contributor
Anliker Marc
Posts: 87
Registered: ‎06-04-2009
Message 7 of 7 (886 Views)

Re: renumbering steps

You can add a script that renumbers the steps in any case. Here it is:

 

Sub RenumberTestSteps
'If StepName is not beginning with "Step", the normal "act_renumber_steps" doesn't work.
'This Sub is renumbering the Steps and replacing the field StepName in any case.

  On Error Resume Next

    TestID = Test_Fields.Field("TS_TEST_ID").Value
    Test_CheckOut(TestID)

    Set TestFact = TDConnection.TestFactory
    Set aTest = TestFact.Item(TestID)
    Set DSFactory = aTest.DesignStepFactory
    Set aStepFilter = DSFactory.Filter
    aStepFilter.Filter("DS_TEST_ID") = TestID
    Set aStepList = DSFactory.NewList(aStepFilter.Text)
    For Each aStep in aStepList
        If aStep.Field("DS_STEP_ORDER") = 0 Then
            aStep.Field("DS_STEP_NAME") = "Step 1"
        Else
            aStep.Field("DS_STEP_NAME") = "Step " & aStep.Field("DS_STEP_ORDER")
        End If
        aStep.Post
    Next
    aTest.VCS.CheckIn "","CheckIn after renumbering Design Steps"

    Actions.Action("act_filter_refresh").Execute

  On Error GoTo 0
End Sub

 

Call this sub instead of "act_renumber_steps". Of course you should also create the function " Test_CheckOut(TestID)" that is checking out the test automatically.

 

Regards

Marc

 

 

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.