Posts Tagged ‘qtp’

WebExt Performance Demo

Sunday, June 29th, 2008

One of the benefits of using Web Extensibility Add-ins is that you get a performance gain in running tests vs using the old WebElement method. For a demonstration, I wrote a basic WebExt add-in that only has one class defined: Div. Div is any object whose tagName is “DIV”, so it is the equivalent of WebElement(”tagName:=DIV”). You can download it here. All you have to do to use it in your QTP 9.5 environment is extract that zip file into “C:\progfiles\hp\QuickTest Professional\dat\Extensibility\Web” and restart QTP. Make sure to check the “rawElements” add-in on QTP’s splash screen.
(more…)

childNodeByID function for Web Extensibility

Friday, June 27th, 2008

During the Web Extensibility talk at HP Software Universe, somebody asked me to post the code for childNodeByID. This is a javascript function that is useful in Web Extensibility projects. It lets you find the child of a DOM object that has a specific id attribute.

At the time, I said this function was only a few lines long. I was wrong. Somebody with more javascript experience could probably golf this down to a few lines, but my version is pretty long.
(more…)

The future of QuickTest Pro

Wednesday, June 18th, 2008

HP just gave a revealing presentation about the next version of QuickTest Pro. It is codenamed Atlantis, and it will probably be called QuickTest Pro 10.0. QTP 10 is targeted to be released in the beginning of 2009.

I’ll break down some of the features that were discussed.
(more…)

HP iz haX0rz

Wednesday, June 18th, 2008

Caleb Sima from SPI dynamics is presenting on the main stage. Demoing SQL injection. This is pretty common stuff, but his presentation is making it much more accessible than others I’ve seen.

He showed SPI’s SQL Injector tool, and I could feel the fear coming from part of the audience. I suspect he is going to ease their fear by telling them how they can buy his product.

Live from Las Vegas

Monday, June 16th, 2008

I’ve just checked in to the swank Palazzo hotel in Las Vegas for HP Software Universe.

I don’t know if it qualifies as live blogging, but I will be posting a few updates throughout the week about goings on here.

UPDATE:

You can also read coverage of HPSU 2008 on loadtester.com. They also have a HPSU bingo card for those attending. One of the squares on the card is in the title of my presentation: Web 2.0.

Using Rally as an automated test case repository

Thursday, June 5th, 2008

Rally is the centralized repository for our… everything. We use it for our Story Cards, Defects, Test Cases… everything. Our test execution platform doesn’t require it, but their simple API makes things extremely easy to access via script. It doesn’t do real Configuration Management - it doesn’t build the software or perform source control. It just helps us manage the process and all of the test data we generate.

(more…)

I sure could use an “implements interface” in VBScript right about now…

Wednesday, June 4th, 2008

In the last post, I showed a basic code snippet and described a little about how we implement our test scripts for automation. This post will go more into detail about how the underlying objects are implemented.

(more…)

Execute Javascript from QuickTest Pro

Tuesday, May 20th, 2008

Despite persistent the rumors to the contrary, you really can execute Javascript from QTP, and not just using Web Extensibility. Here is a simple function that will run some javascript in IE and return the result.

Visual Basic:
  1. Public Function evalJS(oBrowser, sJavaScript)
  2.     Set JSEntry = oBrowser.object.document.documentelement.parentnode.parentwindow
  3.     On Error Resume Next
  4.     evalJS = JSEntry.eval(sJavaScript)
  5.     On Error Goto 0
  6. End Function
  7.  
  8. Set oBrowser = Browser("version:=inter.*")
  9. evalJS oBrowser, "alert('Hello, world');"

(more...)

Help for QTP Novices

Tuesday, February 5th, 2008

This month AdvancedQTP is running The Flight Reservation Project, which is a tutorial series based on the Flight Reservation example application that ships with QuickTest Pro. This series focuses on testing a Windows application, which is outside of the Inquisition's usual subject matter of web apps.
(more...)

QTP 9.5 feature review - Web Extensibility Add-ins

Tuesday, January 29th, 2008

I've now had a few days with Quicktest Pro 9.5, and most of that time has been spent with the new Web Extensibility feature. This feature has huge potential. I look forward to seeing how it is accepted by QTP programmers.

The basic idea is that you can create your own QTP add-in. When your add-in is loaded, Quicktest will recognize objects you defined in your add-in and make your custom methods available for them.

After I went through the tutorial in the QuickTest 9.5 documentation, I jumped into creating a Web add-in for a simple DIV in the product I am testing. I called the extension auLogin and the object auLoginForm. The first method I added was SubmitLogin. All it does is click the Login button. This seemed to be an unambitious task, but it proved more difficult than I counted on because I didn't learn as much as I thought through the tutorial. It is also something much easier done with the single line Browser().Link("html id:=Submit1_a").click, but this exercise is about learning, not being efficient.
(more...)