By Roshi Malhotra
(Continued from Updates about QTP 10 (I) … )
II. Report improvements
The native QTP report includes several new improvements:
Tracability: Selecting a report-node will automatically focus on the relevant code-line in the script. This may sound like a cool feature at first, but a closer look revels that it only works for actions (not functions); and that in any case, using a custom report function (as most of us do) completely nullifies the feature (since you’re always at the same code line when performing the report).
Exporting: The report now has a two-click export feature, which comes with a built-in ability to export to Word and PDF documents, as well as the ability to export through a custom XSL of your choosing. You can choose between Short and Long formats (corresponding to PShort.XSL and PDetails.XSL) to get a document relevant to your needs. This blessed feature has one major flaw – It has no API support. This means that you cannot export the results automatically at the end of a test run, which is quite a miss, to say the least.
Resource Monitor: QTP can now hook onto the Windows Performance Monitor and present it as part of the test results. You can select several counters to monitor (e.g. GDI objects, memory usage etc.), and the monitor output graph will be available in special tab in the result window. You can set up a “checkpoint” for a counter (e.g. Fail the test if there are more than 500 GDI objects), facilitating a kind of a poor-man’s version of load-testing.
The fact that clicking the graph focuses on the relevant test step (as well as the other way around), provides an effective way to quickly locate problematic actions and resource usage spikes. This feature is well executed, and HP has even went the extra mile and added several unified counters that simplify monitoring the application. However, the fact that you can only monitor one process per test may leave the more advanced users with their own implementation of a resource monitor.
Native image integration: This is a small, yet long-awaited feature. The ReportEvent command now has a new optional parameter – you can specify a path to a picture file, and it will be attached to the report node of the current event. When used in conjunction with the CaptureBitmap method, this presents a technical, yet revolutionary upgrade to the native QTP report. Finally, users can attach screenshots to their custom report events without any special functions or frameworks.
III. IDE improvements
Intellisense: IDE improvements, and the new intellisense engine in particular, is what got me excited about QTP Atlantis.
Can create an Excel COM object provided a full intellisense for all its methods and properties, for as many levels as we’d like. Every variable set to this object also presented the same intellisense, and the autocomplete caught every variable we’ve defined or used (yes, there’s autocomplete for variable names!). The autocomplete and intellisense features worked smoothly, and presented no apparent performance issue. It’s still left to be seen how it functions in a real script, with hundreds / thousands code lines.
Tasks and Comment Pane: QTP has a new bottom pane which includes a run-of-the-mill implementation of tasks and comments. Double clicking a comment will take you to the relevant code-line, though strangely enough, you cannot do this with a task (i.e., tasks cannot be linked to specific code lines). It was mentioned that enabling the comments feature for function libraries may sometimes cause performance issues.
Dynamic code-zones: When standing inside a code block like If, While, Do, etc, the IDE will mark the relevant block with blue lines, making it much more easy to make your way inside nested blocks of this sort (somewhat like highlighting left-right bracket pairs). While it will surely make our life easier, a more robust mechanism like collapsible code-regions is still needed.
Custom Toolbars: You can add your own buttons and commands to QTP toolbars and menus. While this does not include inner-QTP macros, you can assign a program / File shortcut to your own button / menu item. It’s nice, but i think it will only gain power once QTP’s inner mechanisms will be bindable to such buttons.
IV. Miscellaneous features
General look and feel: QTP has departed from the old Tab layout, and into the more modern settings-tree layout (similar to Office, EMule, Adobe, and pretty much every other program). It’s nice, but nothing as groundbreaking as the transformation in QTP 9.0.
Bitmap Checkpoint improvements: These include presenting the size of the selected area when choosing to check only a part of an Image, as well as the ability to plug your own custom DLL for comparing images. Another great addition is the ability to see the difference between the expected and actual bitmaps in a separate tab.
API changes: QTP Automation API will receive several upgrades, the most noteworthy of which is the ability to read and write that code of the test you’ve opened. Writing the code will not effect an ongoing run-session (there goes my ambitious try-catch implementation for QTP), but it still opens the door for some creative tweaks and hacks…
Saving a test with all linked resources: For those who’re working with QC, this is a real blessing. Up until QTP 10, copying a QC saved test to your local system was a hellish procedure of changing each and every resource and action reference to your local file-system. QTP and QC Atlantis offer a one-click solution for copying a test and all its resources to your local file-system, and automatically changing all the references accordingly.
Dynamic Action Call: I’ve saved the best for last. QTP 10 presents a new native command – LoadAndRunAction. It allows you to load external actions during the run-session, without having to associate them with your test beforehand. All the run-time debug abilities will be available for these dynamically added actions, so you’re not giving anything up by using this feature. I think it’s a long awaited feature, and a well executed one.




