Posts

Showing posts with the label Function

Tips to Optimize QTP Scripts to Yield Better Performance

Tips to Optimize QTP Scripts to Yield Better Performance We use Automated-testing tools to optimize our manual testing processes. But in order to reap full benefits of any automated testing tool, we must know the complete ins and outs of the tool otherwise it would be a huge waste of money spent on automation. We have to learn the automation tool very thoroughly. We also need to learn the language of the automation tool to do coding more effectively and efficiently. I believe that a software testing tool is as good as the person who is actually using it. I have been getting so many emails from my esteemed readers asking about HP QuickTest Professional tutorials, QTP tips and tricks etc. Some readers even complain that their QTP scripts are too slow to execute. This time I decided to write a post on how to use QTP more effectively which means how to make our QTP scripts perform better. In order words, this post will throw light on some points, which will optimize your QTP scripts...

Date Time Functions In Visual Basic / QTP

The following functions isolate the date portion and time portion, respectively, of a Date/Time value: Function Description DateValue Returns the date portion of a Date/Time value, with the time portion “zeroed out”. (Note: When the time portion of a date/time variable is “zeroed out”, the time would be interpreted as 12:00 AM.) Example : Dim dtmTest As Date dtmTest = DateValue(Now) At this point, the date portion of dtmTest is 8/31/2001, with a time portion of 0 (12:00 AM midnight). TimeValue Returns the time portion of a Date/Time value, with the date portion “zeroed out”. (Note: When a date/time variable is “zeroed out”, the date will actually be interpreted as December 30, 1899.) Example : Dim dtmTest As Date dtmTest = TimeValue(Now) At this point, the time portion of dtmTest is 9:15:20 PM, with a date portion of 0 (12/30/1899). The following functions are used to isolate a particular part of a date: Functi...