IDE Enhancement - QTP

QTP 11 IDE enhancements are described in this section.

Comments

You can now comment and uncomment select blocks of code. This can be done using one of the following ways:

  • Using the Edit toolbar
  • Using the shortcut hot keys after selecting the code block:
  • Comment Block (CTRL + M)
  • Uncomment Block (CTRL + SHIFT + M)

Improved IntelliSense

QTP 11 has improved IntelliSense as compared to its previous versions. Now, IntelliSense also works « hen creating tests using Descriptive Programming (which was not the case with QTP 8.x). QTP 11 a^so provides IntelliSense for COM objects created using CreateObject as shown in Figure.

Run to Step, Debug from Step and Run from Step

QTP 11 provides the following 3 features during debugging a test case:

  • Run to Step: This option allows QTP to execute the script upto a specific line of code and Pause where the option 'Run to Step' was selected Shortcut for this option is available using the CTRL + F10 combination
  • Debug from Step: This option starts the script in Pause mode from the specified line
  • Run from Step: This options start the script in Run mode from the specified line

Run to Step, Debug from Step and Run from Step

Enable/Disable Breakpoints

QTP 11 allows you to disable and later enable existing breakpoints. In QTP 8.x you had to clear all Checkpoints to disable them but in 11 after disabling the Checkpoint the CheckPoint are still present but remain inactive until re-enabled.

Renaming Checkpoints

QTP 11 allows renaming Checkpoints which was not allowed in QTP 8.x. This feature allows teams to easily alter their code once its created without recreating the Checkpoint.A few pointers to note from the Figure and the result after accepting the changes made to the Function Definition Generator:

  • The string added to the Description text box appears as a tool tip when selecting the function from the IntelliSense list
  • The Documentation text is displayed in the documentation column when working in the Keyword View
  • The function parameters <File> and <Folder> are replaced with actual values for the Documentation text
  • To add description and/or documentation, it is not necessary to declare the function through Function Definition Generator only. If we type the function manually into the IDE, then the below code snippe twill work in the same manner:

@Description Copies File to Specified Folder
'@Documentation Copy File - <File> to Folder - <Folder>
Public Function CopyFileTo(ByRef Folder, File)
'TODO: add function body here End Function

Library Support Enhancements

QTP 11 allows editing multiple libraries at the same time. It also allows debugging any library added to the Test Settings Resource tab. However, debugging of libraries loaded using the ExecuteFilestatement is still not supported. To overcome this limitation, QTP 11 provides a new method called LoadFunctionLibrary to load a library at run-time while providing debugging support.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

QTP Topics