- QTP - Designing a Framework
- QTP - Frameworks
- QTP - Automation Object Model
- QTP - Descriptive Programming
- QTP - Working with XML
- QTP - Accessing Databases
- QTP - Virtual Objects
- QTP - GUI Objects
- QTP - Test Results
- QTP - Library Files
- QTP - Environment Variables
- QTP - Recovery Scenarios
- QTP - Error Handling
- QTP - Debugging
- QTP - Smart Identification
- QTP - Synchronization
- QTP - Checkpoints
- QTP - DataTables
- QTP - Actions
- QTP - Object Repository
- QTP - Record and Play Back
- QTP - Environment Setup
- QTP - Test Automation
- QTP - Introduction
- QTP - Home
QTP Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
QTP - Error Handpng
在QTP中存在各种处理错误的方法。 有三种可能的错误,一种是会碰到的,同时与QTP合作。 他们:
Syntax Errors
Logical Errors
Run Time Errors
Error Types
Syntax Errors
先天错误是字体或法典的一部分,没有用文法确认。 在编纂法典时发生先天错误,在错误确定之前不能执行。
为了核实yn子,使用主要短机Ctrl+F7,其结果如下所示。 如果窗口没有展示,则可以浏览“意见”——“错误”。
Logical Errors
如果该书的正文正确无误,但产生出意料的结果,则该书称为逻辑错误。 逻辑错误通常不会中断执行,而是产生不正确的结果。 逻辑错误可能是由于各种原因、错误的假设或对要求的误解,有时是不正确的方案逻辑(使用实际上而不是“不使用”)或“无限选择”。
查明一个逻辑错误的方法之一是进行同行审查,并核实质量保证方案的产出档案/文件,以确保该工具能够采用应有的方式。
RunTime Errors
如姓名所示,这种错误发生在鲁普时代。 造成这种错误的原因是,试图做事的文字无法做,而且文字通常会停止,因为它无法继续执行。 1. 时代错误的典型例子——
File NOT found but the script trying to read the file
Object NOT found but the script is trying to act on that particular object
Dividing a number by Zero
Array Index out of bounds while accessing array elements
Handpng Run-Time Errors
处理法典中的错误有多种方法。
1. 采用测试环境 • 远距离处理可定义为“File”和“File”;>“Settings”和“Run”塔,如下所示。 我们可以选择任何特定环境,点击“科索沃”。
2. 采用/> “关于Error”的说法被用来通知VB文本发动机打算由测试人处理操作错误,而不是允许VB文本发动机显示不方便用户的错误信息。
3. 采用Err Object-Error Object is an in-built Object within VB Alan, 抓住了可轻易推卸该守则的错误编号和错误描述。
Err.Number- 该数字归还财产或设定一个数字价值,具体说明错误。 如果净值为0,则没有发生任何错误。
Err.Clear- 明确的方法推翻了错误,并明确了与错误相关的以往所有价值观。
Example
Call the function to Add two Numbers Call Addition(num1,num2) Function Addition(a,b) On error resume next If NOT IsNumeric(a) or IsNumeric(b) Then Print "Error number is " & err.number & " and description is : " & err.description Err.Clear Exit Function End If Addition = a+b disables error handpng On Error Goto 0 End function
4. 采用Exit 声明——可使用Exit 声明,同时根据Err.Number数值,反对退出试验或行动或变造。 让我们详细看到其中每一个发言。
5. 恢复情景——在遇到错误时,根据某些条件启动恢复情景,并在单独一章中详细论述。
6. Reporter Object - Reporter Object help we to report an activity to thepr results. 它有助于我们确定有关行动/步骤是否通过/失败。
Syntax: Reporter.ReportEventEventStatus, ReportStepName, Details, [ImageFilePath] Example Reporter.ReportEvent micFail, "Login", "User is unable to Login."Advertisements