sexta-feira, 18 de janeiro de 2013

[BUG] Columns in the datatable with the same name


Well, according to one of the QTP premises, you cannot include two columns with the same name in the DataTable. Make sense since you can't have two parameters with the same name. But I've found a crack in this wall.

Start a new test. Rename the column A to other name (say 'test'). Click the column 'test' to select it, right click and select Edit --> Insert. QTP will insert a column named 'A', Right click the column 'A', Edit --> Insert and you will get ANOTHER column 'A'.


Just out my curiosity, debugging what happens when asking for column 'A', QTP returns the value from the first column found.

[BUG] Active screen (not so active)


Oh my, the active screens! Another brilliant idea turned into crap with an awful implementation.

Basically, every step you capture using the the "Record" button, generate a few things in your test: respective objects in the repository, a line of code in your test, checkpoints (if that's the case) and screen captures, for you to review the screen and objects appearance by the time you captured them.

Cool, right? But no.

Every screen captured is associated to the line where it was associated, and not to the object itself. I know it sounds weird, but you can make a simple test to prove this.

Capture two objects (say two links) in the same page. The screen captures will look OK.





Now, manually swap the name of the links in your code and check the Active Screen again. It didn't swap accordingly!

[BUG] Object Properties doesn't work in the code when an object has RegExp


Another very handy feature in QTP is that you can right over your code, where you have a Browser(...).Page(...).Link(...) object and choose "Object properties" option, which shows you a small screen to view its properties and a button to take directly into the Objects Repository, with your object selected.




Well, in QTP nothing can be too good.

Say in our example above, the .Link(...) has a regular expression such as .Link("text:=Search"). In this case,  the option "Object Properties" in right click menu will be disabled for objects Browser() and Page() objects. Again, I have no idea why.


And even worse, if your Browser(...).Page(...).Link(...) is part of an IF statement (or any other statement), then this option won't be available at all. No properties will be available for any object.

Message for all visitors

Hey you! Yes, you my visitor.

First of all, thanks for stopping by and reading my blog. It's an honor!

Second, if you haven't found the issue you are looking for, feel free to leave a comment. I'll be glad to help you in any sort. :) And maybe I will post the issue/solution here.

Thanks in advance!

[BUG] QTP 11 has a bug fix... OH WAIT!

Human beings are capable of adapting to the environment it lives in.

Bringing this sentence to the IT world, it's funny sometimes after countless hours working with the same software we end up getting used to its bugs and issues it has.

QTP is a very good example. Most of the issues I've found (but not all) and posted in this blog have a way to workaround it. And even sometimes we find the somehow useful.

Well, turns out that the ONLY useful bug present in QTP 10 was fixed (so to speak) in QTP 11.

When you open a test in read-only mode, you can't do much to it except (1) run and (2) delete values from the DataTable (this last one is the bug). And this is the point, several times it's useful to open a test and delete a few cells in the DataTable resting assured that they will be intact when you re-open the test. In our tests, we usually have several rows (which represents the test scenarios) in the DataTable and a column called EXECUTE, which indicates if that row must be executed or not. Anything different from "Y" and the row is skipped.

But now, QTP 11 tells you you can't edit the DataTable in read-only mode. Sad.

quarta-feira, 16 de janeiro de 2013

QTP 11 + critical patches: first impressions

This was meant to be a post to talk and discuss all the new neat features found in QTP 11, but it turns out that I ended up uninstalling QTP 11, rolling back to version 10. And (spoiler alert!) bottom line, I had found only two new features, which.... you know... doesn't make you fall in love for this new version.

Yeah... reality sucks... I know. Don't blame me! Blame HP!

So, you are wondering why I had to rollback to its previous version, right? Lets talk about them.
  1. Most of the problems (not to say all) discussed in this blog were not fixed: I've retested all the issues I know regarding QTP and no one of them were fixed.
  2. Results Viewer screen is WAAAAAAAAY sluggisher than version 10: this new version brings a redesigned/re-coded from ground up, but turns out that it became too slow. Not sure why.
  3. No Alt + N feature in Results Viewer: an extremely useful feature present the in the past version is the "find next" feature in Results Viewer, which enables you to jump straight to the "errors" and "warnings" in your results.
  4. Flex add-in do not recognize objects: not sure if this issue is related to the new QTP version or the Flex add-in, but QTP doesn't recognizes graphs writen in Flex.
  5. Concurrent licenses issues: the licensing model adopted by most of the companies (one single server to serve all computers), turns to be a pain when you have multiple computers in your network consuming near limit licenses. Sooner or later, one's QTP will start complaining you do not have enough licenses to support all instances in your network. We suspect that Results Viewer app is also consuming licenses from your server, which is total/super/hyper/mega shame.
A very short set of feature were added in the version 11.
  1. Compatibility with new browsers (Firefox and Chrome): I haven't used it, so it's not relevant to me; if that's your case, I wish you good luck.
  2. New Report Viewer program: already posted my impressions regarding it; it seems to be a little better overall... but no.
  3. New Regular Expression evaluator: maybe this is the ONLY useful feature in QTP 11 that make me state "cool!", but it's not enough to keep the charm on me.
  4. New options in Object Spy detection screen: instead of having only the finger-pointed button, now we also have a "highlight in application", "add new object" and "copy obj properties to clipboard" button. They are handy... but very little improvement for a major release.

Long story short, bugs from previous version still pledge QTP 11, and lack of enhancements are all around.
Soon I will be posting several enhancement tips QTP definitely deserves.

sexta-feira, 4 de janeiro de 2013

[BUG] Datatable with no memory (fixed in QTP11)

Can you tell me how many typing mistakes you made in your live? Probably, countless times a day, right?

Well, don't feel bad! It's absolutely normal, every human being makes mistakes. What differentiate us from other animals and machines (and QTP, I might add), is the fact that we learn with our mistakes and evolve towards excellence.

I know you saw that coming, and you are correct in your expectations: the datatable pane DOES NOT allow you to undo editing. No Ctrl+Z, no right-click menu option, no nothing. Bear with me, you must have a copy of your precious datatable (if that's the case), cause if you accidentally type anything over a filled cell, I'm sorry for you!

Workaround: (1) be very careful to not mistype inside the datatable, (2) have periodical backups of your script, or (3) enable version control (in Quality Center or any sort) for your script. Other than that: I'm sorry for you!