Adventures in GUI automation

Posted on Posted in Everything

So I’ve been hacking away at QTP for the last couple of weeks (no, I didn’t make the decision to purchase it, yes I have to use it as the political consequences of not doing so are more painful).

I’m not a massive fan of QTP, mostly because I think that it’s really bloody cheeky for a company to charge six figures for a product because of its feature richness, then charge 5 figures for training because it’s so complex that no one can use the damn thing, not to mention that all the official written how-to information is safely tucked away behind a walled off site, available for those who pay their support fees. For the same price HP charge for basic QTP training, I could fly any world-class tester out here for a week to hang out with me and my team. I know which option I’d get more value from.

Luckily there are plenty of useful sites out there maintained by QTP users, which is handy because if your support fees are not paid up, you get bugger all from the source.

QTP 10 has some inherent bugs that annoy me and I’m still dubious about how well the shared object library will work for me in the long run, but leaving the ranting and bitching aside, I should say that it does seem to be doing what I tell it to most of the time.

I’m attempting to implement Michael Hunter’s Logical Functional Model (which I think is really bloody clever, btw) as best I’m able. It’s still early days yet, but we’ll get there. I do run into problems a lot, largely because if my inexperience with the tool, but perhaps some good will come of it if I share my pain with you 🙂 I’m going to post bits and pieces that I discover, just in case they’re useful to others. I don’t know how well QTP will fit the LFM, but I’ll see what I can do about documenting my progress with that as well.

For the moment, here are a few links that I have found useful:

There are a few others out there, but they’re full of ISTQB ads, so I don’t really feel like linking to them. I’m sure you understand.

5 thoughts on “Adventures in GUI automation

  1. Hi Ben,

    I’m about to wish you good luck in your adventure and make a couple of notes that might be of value to you.

    So, good luck in making your smoke/sanity/regression testing suite efficient and reliable, robust and maintainable!
    In addition to resources you use the following might help in that too: http://safsdev.sourceforge.net/FRAMESDataDrivenTestAutomationFrameworks.htm

    A note about pricing. Since you didn’t make a decision yet, you may want to take a close look at TestComplete. It has some surprising features including it’s price. If you’re more leaning toward open-source/free tools explore Robot Framework and AutoIt.

    A note about Object Repositories in QTP. If you’re going to build your own framework targeting low maintenance cost in the long run, I’d suggest you managing OR’s dynamically, like in a short code example below.

    ‘Load repository
    intPos = RepositoriesCollection.Find(sRepositoryFile)
    If intPos = -1 Then
    RepositoriesCollection.Add sRepositoryFile
    End If

    ‘Unload repository
    intPos = RepositoriesCollection.Find(sRepositoryFile)
    If intPos -1 Then
    RepositoriesCollection.Remove intPos
    End If

    (RepositoriesCollection is a built-in QTP object)

    Thank you,
    Albert Gareev
    http://automation-beyond.com/


    [Ben’s response]
    Thanks Albert.
    I’m afraid the decision re purchase was made a while ago, hence me embarking on said adventure. Open source would have been my preference, alas the decision was not mine to make.
    I’m curious. Can you tell me what the advantages are of managing the OR dynamically? I imagine that it provides a performance boost when you’re dealing with large repositories, as you can link to what you need when you need it. Is there more to it than that?
    Thanks for stopping by and for your advice.

  2. I think that it’s really bloody cheeky for a company to charge six figures for a product because of its feature richness, then charge 5 figures for training
    >> Yes, it seems like HP has just continued with the legacy of Mercury (the co it acquired in around 2006). High time price should come down.

    because it’s so complex that no one can use the damn thing
    >>Sorry, I have to disagree here not because I am used to it but I have seen people(freshers) able to ramp up fast with this tool with minimal training.

    Thank You for sharing Michael Hunter’s link. Do keep us posted with your experience on QTP.

  3. because it’s so complex that no one can use the damn thing
    >>Sorry, I have to disagree here not because I am used to it but I have seen people(freshers) able to ramp up fast with this tool with minimal training.

    True enough I suppose. Thanks for bringing my lack of clarity to my attention. 🙂
    I maintain that while damn near anyone could use the record/playback functionality, this doesn’t necessarily mean they are proficient in using the tool. Throwaway scripts are one thing. Knowing enough about the tool (when to use the object repository, when to use descriptive programming, how to create functions and classes and so on), but my (admittedly poorly made) point was that there are a large number of things that you can do, and if you do not have money or an experienced guide, then doing anything more than rudimentary checks will take you some time.

    I suppose it really depends on what your needs are, but it would seem a bit wasteful to spend so much money on a tool if all you need to do is record throwaway scripts.

  4. Hi Ben,

    Replying to the previous comment.

    QTP is very powerful tool with high integrity but its price makes it available to organizations in certain segments only. But since you have it that’s a good automation platform to start developing your testing tools.

    If you’re comfortable developing solid programs I would recommend you not to use built-in QTP framework and develop your own, truly keyword-driven instead. That way, your test automation will be script-less, and you will only have to maintain code of the core engine which is compact and project-application-independent.

    Regarding OR’s. There are more valuable advantages than performance boost.
    First of all, default QTP mechanism requires attaching OR’s to Actions. Managing on your own you have the full freedom and it comes very handy when you create generic, highly reusable components.
    Second, if your application is multi-lingual you either have to duplicate test code (of course, that creates more maintenance problems) – or you can load OR’s dynamically and reuse same Actions.

    – You’re very welcome. Don’t mind to drop questions to my email or blog, if you have some more.

    Thank you,
    Albert Gareev
    http://automation-beyond.com/

Leave a Reply

Your email address will not be published. Required fields are marked *