Automation Testing, Manual Testing, QTP/UFT 11 , QC/ALM 11 ,SAP TAO, Unix, Selenium, Oracle SQL, Shell Scripting and For Online Trinings to contact me : Cell:+91-8897972059 , Email Id : quicktestprotech@gmail.com

Tuesday, February 25, 2014

How to Hide And/Or Remove a Test Set Test Status in ALM v11 using Workflow

Summary: 

This workflow example demonstrates how to omit the Test Set Test status code “Blocked” from the list of available status values.
This example assumes you are a Project Administrator proficient with programming skills, proficient in vbscript, Quality Center objects and methods.

*** It is necessary to read and accept the ‘Disclaimer’ section at the end of this  notes. ***
Business Rules

1) When a user enters the Test Lab module, the “CUST_Status” list is populated.
2) The “CUST_Status” list is populated from the “Status” list.
3) All the statuses from the list “Status” are replicated except for “Blocked”.
4) To omit a different status, just update the v_omit_status variable with the status you wish to omit.
5) The “CUST_Status” list is assigned to the Test Instance status field “TC_STATUS” when the TestSetTest_MoveTo subroutine is triggered.
6) DO NOT IMPLEMENT IF USING TEST SET TEST STATUS TRANSISITION RULES.
Implementation

STEP 1 – Update the EnterModule Subroutine

1) Navigate to Workflow customization – Tools / Customize / Workflow / Script Editor
2) Select the Script Editor tab.
3) Select “Project Scripts / Common Script / EnterModule subroutine.
4) Update the subroutine with the highlighted code below.

Sub EnterModule
On Error Resume Next
. . .
. . .
If ActiveModule = "Test Lab" then
CUST_Status_List
End If
. . .
. . .
On Error GoTo 0
End Sub

STEP 2 – Create the Following New Subroutine

1) Navigate to Workflow customization – Tools / Customize / Workflow / Script Editor
2) Select the Script Editor tab.
3) Select “Project Scripts / Common Script.
4) Create the “CUST_Status_List” subroutine with the code below in the Common Script area.

Sub CUST_Status_List
v_omit_status = "Blocked"
set cust = TDConnection.Customization
set clists = cust.Lists
set cl = clists.List("Status")
set root = cl.RootNode
If not clists.IsListExist("CUST_Status") then
clists.AddList("CUST_Status")
End If
set nl = clists.List("CUST_Status")
set nlroot = nl.RootNode
for each child in nlroot.Children
Msgbox "Remove-" & child.Name
nlroot.RemoveChild(child.Name)
next
for each child in root.Children
If Child.Name <> v_omit_status then
Msgbox "Add-" & child.Name
nlroot.AddChild(child.Name)
End If
next
cust.commit
Set cust = Nothing
Set clists = Nothing
Set cl = Nothing
Set root = Nothing
Set nl = Nothing
Set nlroot = Nothing
End Sub

STEP 3 – Update the TestSetTest_MoveTo Subroutine

1) Navigate to Workflow customization – Tools / Customize / Workflow / Script Editor
2) Select the Script Editor tab.
3) Select “Project Scripts / Test Lab Module Script / TestSetTest_MoveTo subroutine
4) Update the subroutine with the highlighted code below.

Sub TestSetTests_MoveTo
TestSetTest_Fields.Field("TC_STATUS").List = Lists("CUST_Status")
. . .
End Sub

STEP 4 – Save

1) From the Script Editor toolbar Select File / Save.
2) Close the Script Editor Window. If prompted to save select Yes.
3) Click the Return button to Return to Quality Center. Select Major Change if prompted.
4) Log Out, then Log In to the Quality Center project to Test.

Keywords
Test Instance, Test Set, Status, List, Lists, TDConnection, OTA, Workflow, Quality Center, omit, remove

Disclaimer

While this example may meet the needs of your organization, the sole responsibility for modification and maintenance of the logic is yours and NOT that of the Support Organization.
Be aware that HP Support does not provide troubleshooting support for the custom programming implemented by the customer.
The decision to use the information contained herein is done at your own risk.
The support organization is NOT responsible for any issues encountered as a result of implementing all or any part of the information contained or inferred herein.
The intent of the information provided here is for educational purposes only. As such, the topics in this notes are only guidelines NOT a comprehensive solution, as your own environment will be different.
This example DOES NOT state or in any way imply that the information conveyed herein provides the solution for your environment.
The appropriate system technical resources for your enterprise should perform all customization activities.
Best Practice dictates NO direct changes to be made to any production environment. It is imperative to perform and thoroughly validate ALL modifications in a Test Environment. Use the results and knowledge garnered from the Test Environment experience to create a customized Production Deployment Plan for your own environment.
Always ensure you have a current backup before implementing any solution.

0 comments:

Post a Comment

Loading...