For those of you not in the software testing world, QuickTest Professional (a.k.a., QTP) is a testing tool made by Mercury Interactive. It's a good, as far as those type of tools go, as anything available in my opinion. However, there are a couple of things I don't understand about it's architecture. I am only going to discuss one, though.
Bear in mind this discussion is totally web-based since after all, we are a web-based company.
QTP "learns" and "remembers" objects (these are things like fields, checkboxes, etc...not just controls, mind you, but anything on a page) in a file called an object repository. This is a binary file containing info about the object, it's properties, methods, etc., and how to interact with the object during playback (i.e. "runtime"). Mercury has stated that editing the file by opening it binary is a very *bad* idea.
I personally think the object repository is handy sometimes, since it allows you to share an existing repository over several tests and maintain them in one place (yay for reuse). However, it is also one of the limitations of the design because the repository itself is a pain to manage. Basically, you have no control over it. You can "learn" objects into it, you can rename them, and delete them. That's about it. You can add some properties, and remove some, but this functionality is rarely useful. You can also use the API to add objects to it, but this isn't usually a realistic method. You can also grab the objects at runtime, but this makes mainteance over many tests tough.
This limit to management may seem like no big deal, but here's the problem: if you let QTP "learn" an object, you have no control over where it places it in the repository. Since each object is referenced by its Browser.Page.Object, if QTP creates a new Browser.Page.Object for the new learned object, you might not have reference to the object for manipulation when you want it. QTP provides no tools to move/edit/change the object repository!
Fortunately, there is an API, and I currently writing a tool to manipulate the repository via VB.Net, but I am sure surprised QTP doesn't come with one. If anyone is interested, I'll provide access to the tool.
Next time, commentary on the other thing I don't understand about QTP's design.
posted @ Thursday, December 29, 2005 3:56 PM