3 scenarios when we should automate (or not)
A prevalent belief among IT folk is that automation, by default, will enhance the quality of
How true is that belief?
“There is a time and place for everything”, as the popular idiom goes
, and that holds true for test
Certain scenarios in which automation is generally a good option:
1. Repetitive Tests
A system that needs the same tests executed periodically is a
good candidate for automation. Take for example, support
jects that must perform regression tests for every PR/CR.
Manual effort in such cases tends to be huge and error
Automation can prove very efficient in such cases.
It makes sense to opt for a testing tool with a version controlled
repository to mana
ge the test scripts.
The cost of automation and the initial effort investment for
script creation is usually greater than for manual testing, and it must be analyzed how far this
investment will pay off in the end. A few pointers to help make that decision
How many repetitions of tests are expected, for how long? A longer “life” of the test
scripts tips the scale in favor of automation.
How expensive is the tool?
How much time/effort will it take to create the test scripts? Automation may not simply
play, a lot of design and coding may have to go in to achieve the desired
Are incremental changes expected to the scripts?
Do testers on the team require training on the tool?
“Repetitive tests => automation” is a fair thumb rule but n
ot an inviolable one. A costly
automation setup on one hand and quick
fly manual tests on the other, and you
might just find that automation will not be useful even if you expect a certain number of
2. Manually Infeasible Tests
Before an application is deployed in the production
environment, it might be critical to determine how the
application will behave under huge user load or when dealing
with millions of records.
Such test scenarios are usually best simulated with automati
In high risk conditions, where the cost of missing a test might
be disastrous, even a single
time use of automation might be a
3. Low Severity/Probability Of “Human” Bugs
Automation can perform some jobs far better than a human ca
hope to do. Give the tool and the human tester two excel sheets
with 10,000 rows of data each to reconcile with each other. No
prizes for guessing who can do it faster, without errors.
But then, humans are far better at another sort of testing.
n notice oddities beyond documented tests. Does the
UI look too cluttered? Does the mouse flicker strangely when
moved over the button? Did the screen behind the modal
window just blink?
Automation is limited to testing what it is programmed to do. Not eve
rything that the human
mind can observe/analyze can be programmed, and so, automation will miss out on capturing
some bugs. The question to ask is: how important are those missed
out bugs? An unstable system
might not be ready for automation, as severe “ma
nual” bugs may get ignored. Automation is
better suited to systems in which the “human” bugs are expected to be fewer and are of low
A point worth remembering is that automation vs. manual does not have to be an either
decision. A m
ix can work. Take a multi
a couple of steps might be fit for
automation, not the entire flow. Automate only those steps that will benefit from automation.
A quick QTP tip that may improve the performance of your scripts (for a
While working on a web applications using QTP, you may have noticed most of the time QTP
runs too fast in comparison to the application. Moreover
QTP would not perform any
operation on a particular page unless that page has loaded completely (100%)
. You may
wonder in bewilderment about what to do to make the application (web page) load faster.
Here I would like to give you a simple tip to alleviate your pain (and waiting time) a bit.
If you will notice carefully, most of the times text on a web pa
ge renders very quickly. It is the
images that creates problem and increases the web page loading time. What if we can stop the
images from loading altogether?
All browsers provides this facility whereby you can stop pictures from showing. To do this in
E6, go to Tools > Internet Options > Advanced tab. Scroll down to ‘Multimedia’ section and
To do this in Firefox, go to Tools > Options > Content. Uncheck ‘
Load Images automatically
Run your script now and let us know if this
tip helped you. [For obvious reasons, this tip won't
be of any use when you have to work on image/bitmap checkpoints.]
8 tips on advanced Regular Expressions
If you are a practitioner of regular expressions, you may be knowing, how easy it makes your lif
while dealing with pattern of strings. Regular Expressions is one topic, I feel, everyone in the
who is even remotely related to programming
should gain mastery over. I
can’t tell you enough, how many times regular expressions have ca
me to my rescue.
, yesterday published an interesting article on
advanced usage for re
Though the syntax they have used is PHP
Perl compatible but (after some minor
changes in syntax) you can use it for VB Scripting needs as well. The underlying concepts
ex pretty much remains the same for all programming lang
They have divided the topic into eight sub headings
Back Referencing: is a way to refer to previously matched patterns inside a regular
One of my favorites
complete guide to working on Quality Center with QTP
Q: What are the prerequisites to connect QTP with QC?
Allow other Mercury products to run tests and components
Tools > Options > Run in QTP
you are running the tests on the
computer where you have QC client installed,
then you will need:
QTP Connectivity Add
If you are running the tests on the
computer than where you have QC client
installed, then you will need
in where QC client is installed.
in and QC connectivity Add
in where QTP is installed.
QC connectivity can be found at QC server URL > ‘Add
Ins Page’ link > ‘QC
Connectivity’ link > ‘Download Add
in can be found at QC serv
er URL > ‘Add
Ins Page’ link > ‘More QC Add
link > Download and install QTP Add
in according to its version.
Q: How can we connect QC with QTP using
Automation Object Model (AOM)
Use TDConnection Object.
‘ Create the QuickTest Professional application object.
Set qtqcApp = CreateObject(”QuickTest.Application”)
qtqcApp.Launch ‘Launch QTP
qtqcApp.Visible = True ‘Make it visi
‘Connect to Quality Center
‘qtqcApp.TDConnection.Connect <QC Server path>, <Domain name that contains QC project>,
‘<Project Name in QC you want to connect to>, <UserName>, <Password>,
‘ <Whether ‘password is entered in encrypted or normal. Value is Tr
ue for encrypted and FALSE
“FR”, “Flights”, “learnqtp”, “welcome”, False
Q: How can we automatically connect QTP with QC on start
Go to File > Quality Center Connection. Check the box marked
Reconnect to server on
Q: What if QTP tries to connect with QC automatically but QC login credentials
Change the following properties from 1 to 0. They are prese
nt in mic.ini file under QTP
installation generally found under
Q: How can we access Quality Center Open Test Architecture (OTA) usi
object (AKA TDUtil for QTP 6.5 and backwards). You can find details of all
associated properties like CurrentRun, TestRun, Current Testset, CurrentTestSetTest,
IsConnected, QCConnection under
Quick Test Object Model Refer
Q: Where can we find all methods and properties present under TDConnection
Refer QTP Help > QTP Advanced References >
QuickTest Automation > TDConnection
Q: How can we upload QTP scripts to QC usi
Once connected to Quality Center, open the test using AOM and save it to QC.
‘ Get the Test object
Set qtqcTest = qtqcApp.Test
‘ Use the SaveAs method to upload the test to Quality Cen
qtqcApp.Test.SaveAs “[QualityCenter] Subject
Q: Which version of QTP is compatible with which version of Quality Center?
QC 9.0 integrates with QTP 8.2 SP1, QTP 8.2 SP2, QTP 9.0, QTP 9.1 and QTP 9.2. To check
of your QTP version, check out the
that comes pre
installed with QTP
Q: Can we record Quality Center operations with QTP?
Yes, only with QC 9.2 and above. Use .NET Add
Q: Can we schedule a test run from Quality Center?
Yes, use ‘Test Run
Scheduler’ utility that comes with QC.
Q: Is there version control in QC with QTP?
Yes, QTP 10.0 provides you the version control feature under the name of
present under File Menu. Earlier versions of QTP can work with 3rd
version control tools.
What to do when QTP is not able to identify browse or upload
When we record
using QTP and for some reason QTP does not recognize any upload buttons.
For example, start the recording at this site:
Click on the "Browse" button. Notice this click is not recognized by QTP.
If you go on the link mentioned above, you will see QTP is not able to record the click on
Browse web butto
n. Web buttons are generally associated with
object but if
you see the source of the browse button, you will notice
Now According to
object creates a file upload object with a text
Browse button. Notice the AND. So, in case of
, the text box and
browse button are considered part of ONE object. There are no separate objects for QTP to
What can we do to solve this issue?
Web Event Recording Configuration
Object Spy on the text box/ browse button object reveals that it
is a WebFile type Object.
Using Tools > Web Event Recording Configuration, go to WebFile (under Web Objects
event settings to Always. Click ‘OK’.
Done!. Record the click on browse button, now QTP should be able
to identify the click
on the button.