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.

Wednesday, February 12, 2014

Different types of Frameworks used in QTP

Different types of Frameworks used in QTP


What is Test Automation Framework?

What is Test Automation Framework?

Suppose you are given a task where you have to automate some test cases for an application. When you are finished automating the application, what would be your expectations from the scripts you have created? Wouldn’t you want that –

 the scripts should run as intended without any issues.
 the code and the flows should be easy to understand.
 the scripts should be easy to maintain in case of any changes.

All the above points can be achieved by using a proper Automation Framework.
An Automation Framework is a set of guidelines that you can follow during test case scripting to achieve the above mentioned results. This set of guidelines can be anything such as –

 Specifying the folder structure that will be used for storing test cases, function libraries, object repositories and data sheets.

 Deciding the format of the data sheets i.e., how the data sheets would be grouped and how the scripts will access these data sheets.

 Following proper coding standards and using comments so that the code can be understood easily by anyone.

 Using reusable functions wherever possible so that lesser amount of rework is needed in case of any changes



Tuesday, February 11, 2014

Script to select a mail having subject 'hi' or 'HI'

Script to select a mail having subject 'hi' or 'HI'


n=Browser("yahoo").Page("yahoo").WebTable("Inbox").RowCount
For i=2 to n
s=Browser("yahoo").Page("yahoo").WebTable("Inbox").GetCellData(i,7)
If lcase(trim(s))="hi" Then
Browser("yahoo").Page("yahoo").WebCheckBox("index:="&i-1).set "ON"
End If
Next

How to close all the browsers and open the specific browser

How to close all the browsers and open the specific browser


Set objDesc=Description.Create
objDesc("micclass").value="Browser"
Set objColl=Desktop.ChildObjects(objDesc)
For i=0 to objColl.count-1 step 1
'objColl(i).close
'or
Browser("Creationtime:="&i).close
Next
systemutil.Run "iexplore","www.google.com"

How to close all the browsers

      How to close all the browsers


Set objDesc=Description.Create
objDesc.Add "micclass","Browser"
set objColl=Desktop.ChildObjects(objDesc)
msgbox objColl.count
For i=0 to objColl.count-1 step 1
strBrname=objColl(i).GetRoproperty("name") ' to get the browser name
msgbox strBrname
objColl(i).close ' to close the browser
Next  

How to delete cookies

How to delete cookies


systemutil.Run "iexplore","http://www.google.com/"
webutil.DeleteCookies 'To delete the cookies
systemutil.CloseDescendentProcesses

Loading...