|
Answer» Following are the different types of errors that ONE can encounter in UFT: - Syntax Errors:
- Syntax errors are typos or code that does not conform to the grammar of the VBscripting language. Syntax mistakes arise during code compilation and prevent the code from being executed unless the errors are corrected.
- Use the keyboard shortcut Ctrl+F7 to check the syntax, and the result will be presented as shown below. If the WINDOW does not APPEAR, go to "View" and then "Errors."
- Logical Errors:
- A logical error occurs when the script is syntactically accurate but produces unanticipated outcomes. The operation is usually not interrupted by logical errors, but the outcomes are erroneous. Logical errors can be CAUSED by a variety of factors, including faulty assumptions or misinterpretations of the requirement, as well as poor program logic (using do-while instead of do-Until) or Infinite Loops.
- Peer reviews and verification of the QTP output file/result file are two approaches to uncover logical errors and guarantee that the TOOL did what it was supposed to do.
- Runtime Errors:
- This type of error occurs during Run Time, as the name implies. Such failures occur when a script attempting to complete a task is unable to do so, and the script typically stops running because it is unable to continue.
- Following are some well-known examples of Run-Time Errors:
- The file was not found, although the script attempted to read it.
- The script is attempting to act on the item that was not found.
- Array Index out of limits while accessing array items while dividing a number by Zero.
|