haripotter’s technorati

Just another WordPress.com weblog

Vbscript to revert a ESX Virtual machine snapshot

First of all, let me clarify that the snapshot restore is completely done by the VMWARE perl toolkit. But there may be instances where you cannot remember this long command to revert a virtual machine snapshot. You could create a vbscript function that will help you out with a much easier syntax . All you’ll need is the esx host name where the virtual machine is registered to, the login credentials to the esx host and the virtual machine name. Another advantage is you could use this from QTP to automate the vm snapshot restore process.
Read more »

July 16, 2008 Posted by haripotter | HP Quality Center and QTP, Virtualization | , , , , | No Comments Yet

Determine the mapped drives on QTP Client

You can use WMI Class Win32_LogicalDisk to find that out. With this class not only can we determine which drives are mapped to network shares, but we can also determine which network shares they map to. Please note that the DriveType equal to 4 represents a mapped network drive. For more details about Drivetype values, refer the WMI SDK. The WMI query returns a collection of mapped drives. DeviceID, which returns the drive letter for the drive; and ProviderName, which returns the network share the drive is mapped to .
Read more »

July 2, 2008 Posted by haripotter | HP Quality Center and QTP | , , , | No Comments Yet

Determine the current time on a remote system

At times you may have to determine the time on a remote system to be able to schedule some job on that system automatically. I will talk about how to schedule a job on a remote system in a seperate post. We could use the help of WMI protocol in determining the target system time.
Here’s the function. Have fun !

Read more »

May 22, 2008 Posted by haripotter | HP Quality Center and QTP | , , , | 3 Comments

ESX Server 3.0.x hosts in a VirtualCenter 2.5 environment enter a not responding state after applying certain ESX Server patches

Recently I saw my ESX hosts registered in Virtual Center 2.5 show up as not responding. But I was able to login to the ESX host directly without any problem. Later I found that it has something to do with the ESX patches. I’m qouting an article in vmware website that explains this issue and the patches that you might want to install. Unfortunately this did not solve my problem.. So I’ll keep looking… :(

Overview

ESX Server 3.0.x hosts managed by VirtualCenter 2.5 must have their Host Agent (hostd) specially configured to work with VirtualCenter 2.5. This configuration is done automatically during the initial installation of the VirtualCenter Agent (vpxa). If an ESX Server patch is subsequently applied that includes the esx-hostd RPM package, like ESX Server patch 1002435, the patch replaces the existing Host Agent (hostd) configuration file (/etc/vmware/hostd/config.xml) and undoes vpxa’s changes. This reverting of the Host Agent configuration file breaks connectivity with VirtualCenter 2.5. 

Read more »

May 19, 2008 Posted by haripotter | Virtualization | , , | No Comments Yet

Javascript FireEvent on a WebEdit

There are certain webpages that contain WebButtons that will get enabled only when you complete the text fields (WebEdit). Using QTP, you’ll probably use the set function, for ex WebEdit.Set “Hello” to set the value in a text field. But You’ll observe that the WebButton is still not enabled. Hmmm.. What could be wrong ? If the WebButton is programmed in such a way that it will get enabled only when there is a Javascript event “onkeyup” is fired, then using the set function will not help, because it will not fire this event after entering the text. Read more »

April 30, 2008 Posted by haripotter | HP Quality Center and QTP | , , , | 2 Comments

Download attachment from Quality center

 
HP Quality Center allows us to store any file as attachments. We could use this facility to store testdata, tools or anything that helps us to run a test successfully.

For example : We could store some command line tools in quality center as attachments in a folder. We could download these tools to the qtp system where we want to execute the tool. for such requirements, Try the below code to download an attachment from a testplan folder in qc.
Read more »

April 29, 2008 Posted by haripotter | HP Quality Center and QTP | , , , | 8 Comments

Maximize Browser using QTP 9.5

Below script should help maximizing a browser window. I have tested this with IE7. I’m not sure how it works with Firefox or any other browser. I had problems with the Window.Maximize function. So I had to write this. Hope it helps someone out there.
Read more »

April 29, 2008 Posted by haripotter | HP Quality Center and QTP | , , | 2 Comments

Execute a DOS command in QTP

At times in our QTP testcases we may have a need to execute a command using the DOS command window. This could be anything from a simple DIR command to a complex SSH command that can be execute using a tool called plink.exe. I’ll talk about using plink.exe to execute ssh commands on a remote system in another post. Here is how you call the function to execute a command in command window..

Read more »

February 28, 2008 Posted by haripotter | HP Quality Center and QTP | , , | No Comments Yet

Check status of a windows service on a remote system using WMI

In the automation world, you may be required to check whether the product that you wanted to test is installed and the application service is running properly.  You could use the below code to accomplish that. You could add this to a function library and associate it with QTP test. Then call the function with appropriate test parameters. For example :

Read more »

February 28, 2008 Posted by haripotter | HP Quality Center and QTP | , , , | No Comments Yet

Hello world!

Hello and welcome to my blog. This is my first post in wordpress and I’ll dedicate this post for world peace. Hello World! ♥ Love, Live and let live. Peace be to all of you.

February 16, 2008 Posted by haripotter | Uncategorized | | No Comments Yet