quinta-feira, 14 de março de 2013

[BUG] Successfully failed!

People say that an image worth a thousand words, so here it goes.

My coworker sent me this screenshot, showing the QTP update process result.


I wonder why am I not surprised to see such thing.

sexta-feira, 1 de fevereiro de 2013

[BUG] Tab, tab..... CRASH!

What a great day to find yet another shameful bug in QTP 10. And this time a very quick and dirty one.

Let's get to it. Say you have a WebTable checkpoint, and you need to edit one or more table fields content. Well, that's a very common task, right? Applications change and you have to maintain your script with up-to-date system information. If you're like me, this screen is printed in your retina, as we have to visit on a daily-basis.

Turns out that I found a very stupid bug that makes QTP crashes here.

Under "Configure value" area, select "Constant" option and focus the edit field to the right. Now, press Tab key twice and watch QTP stop responding.


Bye, bye QTP. See you again after the Control + Alt + Del.

Workaround: avoid the steps described above.

sexta-feira, 18 de janeiro de 2013

[BUG] Multiple small issues

This time I decided to post several small issues I face every day at my work in a single post on this blog, just to make it easier for myself and for the sake of simplicity. This post is much larger than the previous ones, but separately they wouldn't be worth mentioning.

Add description property screen is always small: this is certainly a developer laziness issue. The screen 'Add Property' in Object Repository window do not record its size and position when exiting. So, EVERY TIME you have to re-size it. Annoying!



Object repository window doesn't re-sizes correctly: when editing a  table checkpoint (and a few other objects I can't recall), here is what happens when you re-sizes the window. Controls at the right side are not re-sized accordingly. It's a REAL PAIN to edit the cell contents.


Also (1), you may notice that fields under 'Configure value' section are disabled. This is due a bug where Alt-Tab'ing out from this window, makes the fields to become disabled. Hell Who knows why...

Also (2), after re-sizing controls in this window (and making it better to work with), when you exit and re-open it all controls will be reset to its default positions. And that SUCKS A LOT!


Random crashes: seriously, who NEVER EVER suffered a single crash during QTP execution or (more commonly) after closing it down? Usually, when you start experiencing weird QTP behavior after hours and hours of work, close it down and you will get one of these. Below, follows an example.



Code auto-complete is more like a pain in the ass back: usually, when well implemented, the auto-complete functionality is VERY useful, since no one remembers all functions, variables and object names all the time. Also reduces typing and typos. But frequently, auto-completed in QTP just stays in your way. It only comes out in few opportunities, and doesn't really bring you what you want.


Jump to step doesn't always work: one good feature from Results Viewer app is the "Jump to Step" option. On (almost) every step recorded in the test result, you can right click it and choose "Jump to Step in QTP" to automatically switch to QTP in the exact line executed, but for some strange reasons, some steps are not 'jumpable'.


I can't determine why it happens (perhaps it's a step executed from inside a function on a Function Library, I don't know), but for whatever reason it's another huge fucking developer laziness.

[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!