Run ALM Test Sets from VB script

Similar documents
Excel Report - Test Plan Report

Keynote DeviceAnywhere/HP Application Lifecycle Management (HP ALM/QC) Integration Guide. TCE Automation 5.2

Installing Autodesk Vault Server 2012 on Small Business Server 2008

HP Application Lifecycle Management

CentreWare for Microsoft Operations Manager. User Guide

CONFIGURING MICROSOFT SQL SERVER REPORTING SERVICES

Option 1 Using the Undelete PushInstall Wizard.

Universal Management Service 2015

NTP Software File Auditor for Windows Edition

NovaBACKUP xsp Version 15.0 Upgrade Guide

JAVS Scheduled Publishing. Installation/Configuration... 4 Manual Operation... 6 Automating Scheduled Publishing... 7 Windows XP... 7 Windows 7...

HP Quality Center. Software Version: Microsoft Word Add-in Guide

This Deployment Guide is intended for administrators in charge of planning, implementing and

User guide. Business

ACTIVE DIRECTORY DEPLOYMENT

DocAve Upgrade Guide. From Version 4.1 to 4.5

How to configure the DBxtra Report Web Service on IIS (Internet Information Server)

Installation and Deployment

Setting up a Scheduled task to upload pupil records to ParentPay

HP Enterprise Integration module for SAP applications

Technical Support Set-up Procedure

SETTING UP ACTIVE DIRECTORY (AD) ON WINDOWS 2008 FOR EROOM

Acunetix Web Vulnerability Scanner. Getting Started. By Acunetix Ltd.

How To Install Vembu Onlinebackup On Windows (Windows) (Windows 7) (For Windows) (Powerbook) (Winstone) (Vembu) (Program) (Procedure) (

Automated backup. of the LumaSoft Gas database

PCLaw Scheduled Backup

GE Intelligent Platforms. Activating Licenses Online Using a Local License Server

NSi Mobile Installation Guide. Version 6.2

Creating client-server setup with multiple clients

Installing GFI Network Server Monitor

Setting Up the Device and Domain Administration

InfoRouter LDAP Authentication Web Service documentation for inforouter Versions 7.5.x & 8.x

Bitrix Site Manager ASP.NET. Installation Guide

For Active Directory Installation Guide

Access It! Universal Web Client Integration

GWAVA Inc. Retain. Retain Outlook Plugin

5nine EASY Backup Quick User Guide

Lab: Data Backup and Recovery in Windows XP

Desktop Deployment Guide ARGUS Enterprise /29/2015 ARGUS Software An Altus Group Company

E-Notebook SQL13.0 Desktop Migration and Upgrade Guide

Using Windows Task Scheduler instead of the Backup Express Scheduler

CINCH Software Installation Instructions

Silect Software s MP Author

Using a Remote SQL Server Best Practices

CWOPA Broadband Users. Windows Operating System

Application Note - JDSU PathTrak Video Monitoring System Data Backup and Restore Process

Tenrox. Single Sign-On (SSO) Setup Guide. January, Tenrox. All rights reserved.

MIGRATING TO AVALANCHE 5.0 WITH MS SQL SERVER

HP Quality Center. Software Version: Microsoft Excel Add-in Guide

Perceptive Intelligent Capture Solution Configration Manager

Lotus Notes 6.x Client Installation Guide for Windows. Information Technology Services. CSULB

Automating client deployment

How to Log in to LDRPS-Web v10 (L10)

DEPLOYING EMC DOCUMENTUM BUSINESS ACTIVITY MONITOR SERVER ON IBM WEBSPHERE APPLICATION SERVER CLUSTER

STATISTICA VERSION 9 STATISTICA ENTERPRISE INSTALLATION INSTRUCTIONS FOR USE WITH TERMINAL SERVER

Secure IIS Web Server with SSL

TROUBLESHOOTING GUIDE

SOLARWINDS ORION. Patch Manager Evaluation Guide for ConfigMgr 2012

IBM Connections Plug-In for Microsoft Outlook Installation Help

Lab - Data Backup and Recovery in Windows XP

SUMMARY Moderate-High: Requires Visual Basic For Applications (VBA) skills, network file services skills and interoperability skills.

Administration Quick Start

Spambrella SaaS Encryption Enablement for Customers, Domains and Users Quick Start Guide

Configuring a Custom Load Evaluator Use the XenApp1 virtual machine, logged on as the XenApp\administrator user for this task.

DameWare Server. Administrator Guide

Omniquad Exchange Archiving

Pearl Echo Installation Checklist

SOFTWARE INSTALLATION INSTRUCTIONS CLIENT/SERVER EDITION AND WEB COMPONENT VERSION 10

Specops Command. Installation Guide

Ascend Interface Service Installation

4cast Client Specification and Installation

QTP - Open Source Test Automation Framework Quick Start Guide

INSTALLING MICROSOFT SQL SERVER AND CONFIGURING REPORTING SERVICES

Installing LearningBay Enterprise Part 2

Zanibal Plug-in For Microsoft Outlook Installation & User Guide Version 1.1

Using Microsoft Windows Authentication for Microsoft SQL Server Connections in Data Archive

Informatica MRS Backup

ACTi NVR Config Converter User s Manual. Version /06/07

Spector 360 Deployment Guide. Version 7

Appendix E. Captioning Manager system requirements. Installing the Captioning Manager

TIGERPAW EXCHANGE INTEGRATOR SETUP GUIDE V3.6.0 August 26, 2015

SQL Server Business Intelligence

Migrating helpdesk to a new server

How To Export Data From Exchange To A Mailbox On A Pc Or Macintosh (For Free) With A Gpl Or Ipa (For A Free) Or Ipo (For Cheap) With An Outlook 2003 Or Outlook 2007 (For An Ub

Sharpdesk V3.5. Push Installation Guide for system administrator Version

HP Application Lifecycle Management

FAS Asset Accounting FAS CIP Accounting FAS Asset Inventory SQL Server Installation & Administration Guide Version

Dynamics CRM 2011 Outlook Configuration Guide With Windows XP

Veritas Cluster Server Database Agent for Microsoft SQL Configuration Guide

HELP DOCUMENTATION SSRPM WEB INTERFACE GUIDE

escan SBS 2008 Installation Guide

1. Data Domain Pre-requisites. 2. Enabling OST

Insight Video Net. LLC. CMS 2.0. Quick Installation Guide

Business Portal for Microsoft Dynamics GP Field Service Suite

How To Create An Easybelle History Database On A Microsoft Powerbook (Windows)

Important Notes for WinConnect Server VS Software Installation:

VMware/Hyper-V Backup Plug-in User Guide

Browser Client 2.0 Admin Guide

owncloud Configuration and Usage Guide

Transcription:

Summary This example demonstrates how to launch an ALM Test Set from a VB Script for running automation testing at a schedule time. Using Window Task Scheduler can aid to schedule execution of the VBscript. This example was verified with QuickTest Professional (QTP) 11 and ALM 11 patch 4. Currently this script will not work with 64 bit OS. The following is example code will run ALM/Q C Test Set on a remote testing machine as long as the variables have been set within the script ( not covered in this example are other ways of setting these variables). This script will open a connection and login to the ALM/QC server. Once logged in the script will open the path to the Test Set and parse thru all of the Test Sets to find the correct one to run. The Test Run Scheduler will be loaded with the Test Set and the machine to run the Test Set. The Test Run Scheduler must run on the machine that is running the Vbscript. The script will enter a sleep routine to wait for the Test Set to complete and report completion. After the Test Set has completed, the script will check each test to see if there was a failures and set the error code flag. This example assumes you are a Project Administrator with programming skills, proficient in vbscript and Quality Center objects and methods. It is necessary to read and follow the Disclaimer section at the end of this document. In addition, the following environment was used to make this document: 1. Knowledge of ALM Open Test Architecture (OTA) 2. The scripting language is vbscript. 3. The OS is Windows Server 2003 SP2 4. Using Windows Task Scheduler included in Windows Server 2003. 5. You are proficient in the use of Microsoft Windows Task Scheduler. Business Rules 1) When the Task Scheduler launches the vbscript, the specified Test Set is launched. Implementation STEP 1 Create the vbscript 1) Open Notepad 2) Copy the script below into the notepad. 3) In Notepad save the file type as VBS. Example runtestsetremote.vbs Page 1

########################## ' ' Script : Run the ALM/QC Test Sets ' ########################## Dim objtdcon, objtreemgr, objtestsetfolder, objtestsetlist Dim objtestset, objscheduler, objexecstatus, objtestexecstatus Dim strtestsetfolderpath, strtestsetname, strreportstatus, intcounter 'Declare the Test Folder, Test and Host you wish to run the test on 'Enter the URL to QC server strqcurl = "http://almdemo/qcbin" 'Enter Domain to use on QC server strqcdomain = "DEFAULT" 'Enter Project Name strqcproject = "ALM_Demo_Project" 'Enter the User name to log in and run test strqcuser = "alex_tester" 'Enter user password for the account above. strqcpassword = "password" 'Enter the path to the Test set folder strtestsetfolderpath = "Root\Auto Test" 'Enter the test set to be run strtestsetname = "Test One" 'Enter the target machine to run test strhostname="almdemo" 'Connect to Quality Center and login. Set objtdcon = CreateObject("TDApiOle80.TDConnection") 'Make connection to QC server objtdcon.initconnectionex strqcurl 'Login in to QC server objtdcon.login strqcuser, strqcpassword 'select Domain and project objtdcon.connect strqcdomain, strqcproject 'Select the test to run Set objtreemgr = objtdcon.testsettreemanager Set objtestsetfolder = objtreemgr.nodebypath(strtestsetfolderpath) Set objtestsetlist = objtestsetfolder.findtestsets (strtestsetname) intcounter = 1 'find test set object While intcounter <= objtestsetlist.count Page 2

Set objtestset = objtestsetlist.item( intcounter) Wend If objtestset.name = strtestsetname Then intcounter = objtestsetlist.count + 1 End If intcounter = intcounter + 1 'Set the Host name to run on and run the test. set objscheduler = objtestset.startexecution ("") ' Set this empty to run local for automation run agent objscheduler.tdhostname = strhostname objscheduler.run 'Wait for the test to run to completion. Set objexecstatus = objscheduler.executionstatus While objexecstatus.finished = False objexecstatus.refreshexecstatusinfo "all", True If objexecstatus.finished = False Then WScript.sleep 5 End If Wend 'Below is example to determine if execution failed for error reporting. strreportstatus = "Passed" For intcounter = 1 To objexecstatus.count Set objtestexecstatus = objexecstatus.item(intcounter ) 'msgbox intcounter & " " & objtestexecstatus.status If Not ( Instr (1, Ucase( objtestexecstatus.status ), Ucase ( "Passed" ) ) > 0 ) Then strreportstatus = "Failed" testspassed = 0 Exit For Else testspassed = 1 End If Next objtdcon.disconnectproject If (Err.Number > 0) Then 'MsgBox "Run Time Error. Unable to complete the test execution!! " & Err.Description WScript.Quit 1 ElseIf testspassed >0 Then 'Msgbox "Tests Passed!!" WScript.Quit 0 Else 'Msgbox "Tests Failed!!" WScript.Quit 1 End If Page 3

STEP 2 Configure the vbscript for running Run ALM Test Sets from VB script 1) Open the vbscript file created above in Notepad. 2) Change the variables listed below in the script for your own environment. Note there are other methods to set variables that are outside the scope of this example. Variable strqcurl strqcdomain strqcproject strqcuser strqcpassword strtestsetfolderpath strtestsetname strhostname Description URL to ALM/QC server Domain to use on ALM/QC server Project Name User name to log in and run test Password for the account Path to the Test set folder Test Set to run Target machine to run Test Set STEP 3 Configure ALM/QC Client 1) Start Internet Explorer 2) Navigate to the ALM/QC server. 3) Go to the Add in page (http://<insert QC Server>/qcbin/addins.html). 4) Select the HP Quality Center Connectivity link 5) Follow instruction provided 6) Go to the Add in page (http://<insert QC Server>/qcbin/addins.html). 7) Select the HP ALM Client Registration link 8) Follow instruction provided 9) Go to the Add in page (http://<insert QC Server>/qcbin/addins.html). 10) Select the More HP ALM Add-ins link. 11) Under HP Tool Add-ins 12) Select the QuickTest Professional Add-in link 13) Follow instruction provided 14) Once the above items are install close all instances of IE. STEP 4 Configure Windows Task scheduler 1) The following is setup is for Windows 2003 Windows Task Schedule and your task schedule tool may be different. 2) Go to Start > Control Panel > Scheduled Task > Add schedule Task Page 4

3) New window labeled Scheduled Task Wizard will appear. 4) Click on the Next button. Page 5

5) Click on the Browse button and find the location of the VBscript created above. 6) Provide a name for this task. 7) Determine the interval that the script should run (Daily, Weekly, Monthly, and ) 8) Click on the Next button. 9) Enter the Start time. 10) Determine when to execute the task. 11) Enter the Start Date. Page 6

12) Click on the Next button. 13) Enter user name and password for the account to have this VBscript run against. 14) Click on the Next button 15) Click the Finish button. Test Run from command prompt or double clicking and use Microsoft Task Scheduler to run at designated times. Page 7

Keywords QTP, Test Set, ALM, QC, Automation, VBscript, schedule, remote, launch Page 8

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. 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 document 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. Page 9