Quality Center Workflow Manual Runner Call Test Steps (1200 Views)
Reply
Occasional Contributor
JeffForND
Posts: 7
Registered: ‎03-13-2013
Message 1 of 6 (1,200 Views)

Quality Center Workflow Manual Runner Call Test Steps

[ Edited ]

I have a task that is causing me some difficulty and wonder if anyone has any ideas on it.

 

For Manual Tests In a Test Set in Test Lab there is a "Setup" Test (Which has design steps) as the first test in the set, the second and each addtional test require this setup to be performed before they can run, so in each test the first design step is a call to the setup test so that if each test is ran independently it will call the Setup Test first. The problem with this is that for each test in the test set, all the steps for the "Setup" Test are displayed and required to be ran for each test, even though they are not needed for each test because the setup was already done.

 

The requirement I have been tasked with, is if this Test Set is ran and the Setup Test has already passed as part of that test set (Cycle), then to either not display the called "Setup" Tests steps or dipslay them as passed when the Manual Runner window is displayed.

 

I am having some issues, because I am not able to locate where the status of the "Called Test" steps are stored, I see the step listed in the DESSteps Table, but there is no execution status there, the step is not listed in the Steps Table, and the Test, Cycle and TestCycl tables only show "Test" Status, not step status. 

 

If any one has any suggestions on how to update the step which is a call (DS_LINK_TEST Field is populated on DESSTEPS table) to passed so the tester doesn't have to re-execute all the "Setup" Test steps or how to hide that "Call" Step in manual runner please let me know.

 

Thanks,

Jeff Jones 

Please use plain text.
Honored Contributor
Trudy Claspill
Posts: 3,095
Registered: ‎09-09-2010
Message 2 of 6 (1,180 Views)

Re: Quality Center Workflow Manual Runner Call Test Steps

When a manual test is executed in the lab it stores the executed step information in the STEP table. When a step in a test is a Call To Test step, the steps in the called test will be copied in to the executed test case set of steps in the STEP table.

The entries in the STEP table are not created until you get to the point where the steps are displayed in the Manual Runner window for the test.

Without experimentation I'm not sure if you can automatically update those steps to a Passed status and then get that updated data to display in the Manual Runner window. At the very least it would take a lot of customized workflow code. I'm almost positive you won't be able to change the Manual Runner window to not display the steps at all.
[If this post solves or helps solve your issue, mark the thread as solved and give KUDOS to the author for their assistance.]

(Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer.No warranties express or implied for any solution/suggestion posted.)
Please use plain text.
Honored Contributor
Jan Czajkowski
Posts: 1,980
Registered: ‎12-12-2007
Message 3 of 6 (1,163 Views)

Re: Quality Center Workflow Manual Runner Call Test Steps

I found out it can be done - if you are on QC 11.0 SP3 or above. At least I can't get it working at the previous patch levels.

 

The reason it is working from SP3 is a fix in that patch:

 

Defect ID: 183034 [Internal]

Problem: If the workflow function Run_MoveTo is defined in both Manual Runner and Test Lab, then the Test Lab instance is ignored.

Solution: Run_MoveTo is removed from the Manual Runner module (unless the customer already has it defined in the module) to avoid the recurrence of this scenario. Also, a warning message is added in the Script Editor when this duplication is detected.
Limitation: For customers that already have this duplication, the Manual Runner instance will still be ignored.

 

This can be used in combination with a feature that is not self-evident - as soon as you click the Run button in Test Lab, the new Run is added to the Run table. This makes it possible to access the Run using the OTA API from the workflow.

 

I will assume you already found out how to safely establish that the called test has been executed successfully once already, and that you saved the outcome in a global variable (defined in the Common workflow - I have called it calledTestAlreadyExecutedSuccesfully).

 

I will add another global variable, myRun, to the Common workflow:

 

Dim myRun

 This variable needs to be initialized in Run_MoveTo in the Test Lab workflow:

set myRun = TDConnection.RunFactory.Item( Run_Fields("RN_RUN_ID").Value) 

 Now I can access this Run in Step_MoveTo in the Manual Runner workflow:

If calledTestAlreadyExecutedSuccesfully Then
    Set stepList =  myRun.StepFactory.NewList("")
    stepList.item(1).Status = "Passed"
    stepList.item(2).Status = "Passed"
End If

 The nice thing is that when using the code above you are actually transported to the third step in the run. It does not make any difference if the first two steps were defined in the same test as the rest of the steps or if they were part of a called test.

Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
Please use plain text.
Honored Contributor
Jan Czajkowski
Posts: 1,980
Registered: ‎12-12-2007
Message 4 of 6 (1,160 Views)

Re: Quality Center Workflow Manual Runner Call Test Steps

[ Edited ]

If you want the passed steps in Step_MoveTo to be added to the STEPS table you will need to insert a post after each step status line:

stepList.item(1).Post

 

Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
Please use plain text.
Occasional Contributor
JeffForND
Posts: 7
Registered: ‎03-13-2013
Message 5 of 6 (1,128 Views)

Re: Quality Center Workflow Manual Runner Call Test Steps

This works great! Thank you for the help.

There is one other scenario that is causing me some issues though.

If the 1st step is not the "call test" step, and the user would have to pass/fail that step manually, and then the second step is the "call test" step which when manual runner loads would be say steps 2 and 3, I can get it set steps 2 and 3 to passed, currently I run this when the first step loads (so when the user sees the manual runner after pressing begin run the steps are already set to passed), but after they manually pass the first step, I would like the cursor to move to step 4 (bypassing steps 2 and 3 that were set to passed).

If the first step is the "call test" step, it passes the appropriate steps and moves to the next step the user has to interact with as you explained above, now I'm just trying to get that same flow if the first step is not the "Call test"
Please use plain text.
Honored Contributor
Jan Czajkowski
Posts: 1,980
Registered: ‎12-12-2007
Message 6 of 6 (1,103 Views)

Re: Quality Center Workflow Manual Runner Call Test Steps

You wouldn't be able to use the approach I suggested in that case.

 

One thing that would almost work is to add the following to Step_MoveTo:

 

If Step_Fields("ST_STATUS").Value = "Passed" Then
      Actions.Action("StepsView.PassSelected").Execute
End If

 The problem with this is that you will no longer be able to move focus back to a step that is already passed. So it would be very unpractical for users, unless you find a way to work around that problem.

Jan Czajkowski

[Please do not contact me off line for receiving support. Use the forum!]
Please use plain text.
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