Basic QTP Training: Enhancing our script

The past couple of days of our QTP training covered a lot more ground. The most nifty stuff are on tools like the Object Repository, the Object Spy (which is an icon of a guy with a top hat reminding me of Professor Layton), the Active Screen, and the topics on parameterization. I created a short video covering the last 2 topics. So there I demonstrate two things:

  • Updating the script with the help of Active Screen — instead of having to record all over again
  • Updating the script to make use of parameters instead of the hard-coded values.

Basic QTP Training: Creating our first script

For our Application Under Test (AUT), we made use of the sample application called “Flight” which was bundled with QTP.  We were given the test script that we had to automate. Essentially, the script involved:
1. Logging in
2. Creating an Order
3. Faxing an Order
4. Logging out

To accomplish this, here are the basic steps:
(1) Create a new test by selecting File -> New -> Test from the menu (or CTRL+N).
(2) Update the Record and Run Settings by selecting Automation -> Record and Run Settings… from the menu. We needed to add our AUT in the list of Applications.
(3) Create the script — including steps, checkpoints and output values.

You can try recording the steps and it will be able to produce a script.  However, playing it back will fail due to some hard-coded items that are no longer applicable upon rerunning (e.g., window title included the Order Number which would be different in the next run). It also wouldn’t have the needed checkpoints (or the test/assertions) and it wouldn’t gather output data.

For the first script created, QTP’s record function was used to record the steps. Inserting checkpoints and output values were also done during the recording. For instances wherein the object title or text being checked is dynamic (e.g., window title containing the Order Number), we made use of regular expressions e.g., instead of “Flight No. 19” as originally recorded, we made use of “Flight No.*” with the regular expressions checkbox marked.

Here’s a link to a video recording of the script creation:

Alternatively, here’s a similar script creation video without step 3 though, but it does have audio. It covers basic recording and inserting checkpoints and an output value.

Basic QTP Training: Setup

Earlier today was Day 1 of a 5-day Basic QTP Training that I’m attending at work.  Putting my notes here just in case I have to relearn or I have to echo the training. So initially, we did some setup (see details below), and then there was a demo where a manual test case was automated (will post this separately).

Install HP QuickTest Professional

This involved an installer that was nearly 4GB in size. The setup with the wizard was pretty straightforward. After installing, additional configuration included specifying the license and going to Tools -> Options to modify the Run settings such that the “Allow other HP products to run tests and components” checkbox is marked. This is probably since we’re integrating with HP ALM.

Set up ALM integration

QTP can manage to work on its own, but since we plan to be working with ALM for storing and managing the tests we had to install the following items:

  • ALM Explorer (ALMExplorerAddIn.msi, alternative to viewing ALM in IE)
  • HP Quality Center Connectivity (TDConnect.exe, an ALM add-in)
  • QTP for Business Process Testing (Quick-Test_Add-in_for_ALM-QC.msi)

Help yourself

It’s a bit ironic that I’ve become friends with a fellow tester only when she was about to leave the company. We still get to have dinner occasionally and I get to find out about the training and learning activities her new company offers. For instance, she’s got some training lined up on Perl. They also have book reviews with the costs for the books and for reading them shouldered by their company. I think the last book they’ve read was on scrum which I find interesting since I would like to have some experience with Agile methodologies. Their upcoming book for review is on Agile testing, which made me blurt out, “by Lisa Crispin?” and just left me with my mouth agape. Lucky lucky lucky!

As for where I work, well, the last official training I received was way back in 2007. It wasn’t even testing-related. It was an upgrade training on CMMI version 1.2. Some books on software development and testing were purchased last year (or was it the year before). We don’t have time allowances for reading them though. You can, but it would just have to be on your own time. That’s fine, but only if the workload and schedules given to you afford for you to have your own time.

Anyway, the lack of training offered isn’t — and shouldn’t be — an excuse for turning stale. It sucks if you aren’t provided training to keep you up-to-date. But it will still be your fault if you let that stop you from picking up new things altogether. With social media on the rise, one can turn to blogs and testing networks for materials. Web sites covering Agile methodologies, offering programming lessons, giving testing tips also abound. Online shopping has also made it possible to buy books from overseas, but it’s just too heavy on the wallet.

Unavoidably, there are things that impede or limit us — financial constraints, lack of time, no internet at work, lack of available training (although this one’s expected to change soon), etc. But what is important is that we don’t limit ourselves. We can learn if we want to. We can train ourselves. We can seek mentorship outside the confines of our workplace. The potential to grow is there.

Quite aptly, I received a text message from my friend: Obstacles don’t have to stop you. If you run into a wall, don’t turn around and give up. Figure out how to climb it, go through it, or work around it.