Articles

[Collapse]TestComplete/viewarticle/63445/
 [Expand]General Information/viewarticle/63445/
 [Expand]Using Help System/viewarticle/55799/
 [Expand]Getting Started Tutorial/viewarticle/56246/
 [Collapse]Using TestComplete/viewarticle/57875/
  [Expand]TestComplete User Interface, Projects and Settings/viewarticle/57876/
  [Collapse]Creating, Recording and Running Tests/viewarticle/56646/
   [Expand]Naming Objects/viewarticle/56265/
   [Expand]Creating Tests/viewarticle/57373/
   [Expand]Managing Tested Applications/viewarticle/57435/
   [Collapse]Checkpoints and Stores/viewarticle/56266/
    [Collapse]Checkpoints/viewarticle/55270/
     [Collapse]Property Checkpoints/viewarticle/57028/
       About Property Checkpoints/viewarticle/55760/
       Creating Property Checkpoints/viewarticle/57029/
       Parameterizing Property Checkpoints/viewarticle/57033/
       Alternatives to Property Checkpoints/viewarticle/56977/
       Updating Property Checkpoints/viewarticle/55736/
       Tips on Selecting Properties to Verify/viewarticle/57032/
     [Expand]Object Checkpoints/viewarticle/57021/
     [Expand]Table Checkpoints/viewarticle/57051/
     [Expand]File Checkpoints/viewarticle/57002/
     [Expand]XML Checkpoints/viewarticle/57104/
     [Expand]Database Checkpoints/viewarticle/56990/
     [Expand]Region Checkpoints/viewarticle/57039/
     [Expand]Mobile Checkpoints/viewarticle/57109/
     [Expand]Clipboard Checkpoints/viewarticle/56983/
     [Expand]Manual Checkpoints/viewarticle/55350/
     [Expand]Web Service Checkpoints/viewarticle/55279/
     [Expand]Web Accessibility Checkpoints/viewarticle/57067/
     [Expand]Web Comparison Checkpoints/viewarticle/57077/
    [Expand]Stores/viewarticle/55001/
   [Expand]Running Tests/viewarticle/56462/
   [Expand]Handling Playback Errors/viewarticle/56641/
   [Expand]Keyword Testing/viewarticle/55462/
   [Expand]Scripting/viewarticle/56245/
   [Expand]Test Visualizer/viewarticle/55007/
   [Expand]Exploring Applications/viewarticle/55055/
   [Expand]Debugging Tests/viewarticle/56567/
  [Expand]Test Results/viewarticle/55010/
  [Expand]Enhancing Tests/viewarticle/56964/
  [Expand]Teamwork and Integration Into QA Process/viewarticle/57266/
  [Expand]Extending TestComplete/viewarticle/57655/
  [Expand]Automating TestComplete/viewarticle/57438/
  [Expand]Best Practices/viewarticle/64008/
 [Expand]Testing Types/viewarticle/62721/
 [Expand]Applications Testing/viewarticle/62606/
 [Expand]Working With Application Objects and Controls/viewarticle/55815/
 [Expand]Samples and Tutorials/viewarticle/56239/
 [Expand]References/viewarticle/57878/
 [Expand]Other Tools That Help You Test Better/viewarticle/63442/
 [Expand]TestComplete 10 Licensing Guide/viewarticle/63451/
Updated: 7/15/2014 Applies To: TestComplete 10 Rating: GoodGoodGoodGoodGood 7 vote(s) Click to rate: PoorNot badAverageGoodExcellent
Property Checkpoints

About Property Checkpoints

A property checkpoint is a test operation that verifies that an object property has the expected value in the tested application. For example, it verifies the text in a text box or the state of a check box. This helps you check whether your tested application works correctly.

In keyword tests, property checkpoints are performed using the Property Checkpoint operation:

Property checkpoint in a keyword test

In scripts, property checkpoints are performed using the aqObject.CheckProperty method:

VBScript

Call aqObject.CheckProperty(Aliases.Orders.MainForm.OrdersView, "wItem(5, 0)", cmpContains, "Mark Twain")

JScript

aqObject.CheckProperty(Aliases.Orders.MainForm.OrdersView, "wItem(5, 0)", cmpContains, "Mark Twain");

DelphiScript

aqObject.CheckProperty(Aliases.Orders.MainForm.OrdersView, 'wItem(5, 0)', cmpContains, 'Mark Twain');

C++Script, C#Script

aqObject["CheckProperty"](Aliases["Orders"]["MainForm"]["OrdersView"], 'wItem(5, 0)', cmpContains, 'Mark Twain');

How a Property Checkpoint Works

When you run a test, TestComplete reads the current value of the specified property of the tested object (this object must exist in the application at that moment), compares it with the expected value and reports the result. Besides the "equals" check, property checkpoints let you perform "not equals", "greater than", "less than", "contains" and other kinds of checks. String values can be compared in case-sensitive and case-insensitive modes.

Note that property checkpoints can only be used for verifying simple values: strings, numbers, boolean values, dates and so on. They cannot check complex values, such as objects or arrays. To verify such properties, use one of the alternative approaches described below.

How to Create Property Checkpoints

You can add property checkpoints to your test during test recording and at design time. TestComplete provides the Property Checkpoint wizard that assists you in creating and configuring property checkpoints. For detailed instructions on using the wizard, see Creating Property Checkpoints.

Checkpoint Results

During the test run, property checkpoints compare the actual and expected property values and post the comparison results to the test log. If the property values match, the checkpoint logs a success message; otherwise, it logs an error message. The Additional Info panel displays the checkpoint parameters and the difference between the expected and actual property values (if any).

If you want to customize log messages of property checkpoints, use one of the alternative comparison approaches described below. For example, perform comparison using the if … then … else statement and comparison operators and post the success and failure log messages from the then and else branches, respectively.

Property Checkpoint Alternatives

In addition to property checkpoints for property verification, you can use one of the following approaches:

  • To verify multiple object properties at once, use object checkpoints.

  • To compare the actual and expected property values, use the if … then … else statement and comparison operators such as =, >, >=, <, <= and so on. This way, you can implement custom verification logic and post custom success and failure messages to the test log.

  • Use the Compare Properties keyword test operation or the aqObject.CompareProperty scripting method. They are similar to property checkpoints, but they post less detailed output to the test log.

Updating Property Checkpoints

If a tested object whose property you want to verify has been modified in your application under test, your property checkpoint may fail. In order for the checkpoint to be passed successfully, update your checkpoint data. For information on how to do this, see Updating Property Checkpoints.

Samples

TestComplete includes sample test projects (one per each supported scripting language) that demonstrate how to use property checkpoints in tests:

<TestComplete Samples>\Desktop\Checkpoints\Property

See also
Property Checkpoints | Property Checkpoint Operation | CheckProperty Method | Object Checkpoints


© 2014 SmartBear Software. All rights reserved.
Email Send feedback on this document