So I’m working at a client who use, alongside the usual mix of workstations, a hand-held device running on Windows CE. They have 800 of these across the business (though most seem to be sitting with the engineers being repaired, they’re not particularly robust, and don’t react well to percussive maintenance).
To provide a little background, I’m here because the incumbent test/dev team have been advised their services are no longer required. The current Performance team have identified a number of issues, many of which are still outstanding and the focus has now switched to the hand-held terminals (HHT’s).
Long before I arrived, it was decided that performance testing is required for these devices (I agree) and that the best way would be a test script and a stopwatch. To say I disagree would be understating it on a massive level losartan 100mg tab.
I’m all for emulating the real business processes, its just that I know if you “measure” performance with a stopwatch, then you can cease calling it perfomance testing and start calling it “meaningless arbitrary timekeeping signifying nothing”. (Told you I disagreed).
Here at AutomationSolutions, I like to think we look for the better way, I certainly have no interest in wasting my afternoon or my clients money sitting about tapping buttons on an oversized calculator. I’m going to do some research into emulating hand-held operating systems. I’m going to do some research into capturing wireless packets, and simulating that process. I’m going to see if I can identify any way to bring a scientific method to this testing, and if I cannot I’m going to request that we move it immediately out-of-scope or at least admit that we’re more interested in ticking boxes than in accurately measuring performance.
(While I’m thinking about it, I might add a rant tag and some pretty CSS to the site. I suspect this will not be the last word on this topic).
So I’ve got around 10 years experience with Loadrunner, am well-versed with Winrunner, can code in half a dozen languages and still I never got around to learning QTP. Well now I have no choice since we’re using it at my latest client site.
The aim of this article is to provide guidance in QTP, how to start, what to look at, how to record a simple script and parameterise it. The essentials, basically.
I recorded a simple script going from Google to AS.org, inserted one checkpoint as I was doing so. It seems that the insertion of checkpoint is best done at record-time. I’m not clear yet on how to insert one afterwards…
My script looks like:
Browser("Google").Page("Automation Solutions").Check _
It’s very readable I suppose and handily is built around Visual Basic, one of the languages I am familiar with.
Standard stuff like Browser, Page, WebEdit, (“q”, by the way is the name of the textbox object on Google’s homepage. Check with Firebug if you want confirmation) Link and Click are container objects or Actions for specific data, but I don’t think “Google”, “Automation Solutions” or that CheckPoint tell me enough about what’s going on – is “Google” www.google.co.uk?, is “Automation Solutions” a link to the site or a string to be pushed to the browser? And what is that checkpoint checking for?
The Object Repository
Right-Clicking on the keyword “Google” brings up a menu with Object Properties uppermost in the list. Clicking on that brings up this:
I’m not happy with the default properties and although QTP might feel they’re sufficient to identify the object, I want more information so I click the green +.
I can see URL is available for selection (as openurl) so I select that. It has no effect on the code, but in the event I need to debug, I can see how knowing the url could be useful.
Right-clicking on the checkpoint brings up:
It shows what text is being searched for, and it also shows that it can be parameterised. Having added it to the global table, I am forced to wonder how best to data-drive a QTP test.
Using google to search for a data string, find a link based on that string and then check that its on the page we expected might seem trivial but it’s allowed us to see the basics of QTP