May 27, 2013

Checkpoints in Automation Testing

In the last two articles, we saw how to create keyword tests and script tests in TestComplete. In this article, we will learn the checkpoints available in TestComplete. First, what is a checkpoint? A checkpoint is an automated comparison that you can have within an automated test. When the test is run, the checkpoint compares the value stored in the test (i.e. the baseline value) with the actual value and reports success or failure depending on the comparison. A single checkpoint replaces a number of test steps or script statements that perform the same comparison. There are more than 10 checkpoints available in TestComplete. Let us visit them one by one.

Clipboard Checkpoint: This checkpoint is used to compare the system clipboard contents with a stored baseline value. It can be used to validate that the clipboard contents at test run time are equal to or contain the baseline value. The comparison can be set to be case-sensitive or otherwise.

Database Table Checkpoint: This is used to compare the contents of a database table, view or query result-set with the stored baseline values. When you add a database table checkpoint, TestComplete asks you to provide a connection string or ODBC data source and user credentials to connect to the database. Then it asks you for the table, view or query. You can design a custom SQL query to specify the result-set that you want to validate. This checkpoint is useful to validate at run time a very large number of values in a database.

File Checkpoint: This checkpoint is used to compare a stored baseline file with another file during test run. When adding a file checkpoint, TestComplete asks you the file path and name. Then it asks you for the baseline file. You can select a file already stored in the project or use the current file as the baseline copy. When the test is run, TestComplete validates the specified file with respect to the baseline copy.

Manual Checkpoint: This is used for a manual validation during the test run by the tester himself. When you create a manual checkpoint, TestComplete asks you to enter the instructions to be executed by the tester by hand. Then it asks for the filename where these instructions are stored. During test run, TestComplete halts the test execution to display the manual checkpoint dialog. The tester then executes the instructions by hand and clicks on the Success or Fail button in the dialog. The checkpoint passes or fails depending on the tester's input.

Object Checkpoint: This checkpoint is used to validate a number of properties of a particular object in the application. When you add an object checkpoint, TestComplete asks you to identify the particular object by using the Finder tool. Once you select the desired object e.g. a textbox by releasing the Finder mouse pointer over it, TestComplete asks you to select the properties that you want to store as baseline e.g. visible, enabled and text. At run time, the same object is located and its run time property values compared with the stored property values.

Property Checkpoint: This is perhaps the most commonly used checkpoint. It can be used to validate a particular property value of an object. When you add a property checkpoint, TestComplete asks you to identify the particular object by using the Finder tool. Once you select the desired object by releasing the Finder mousepointer over it, TestComplete asks you to select a single property. This property value is stored as baseline.

Region Checkpoint: This checkpoint is used to compare an image at run time with a stored image copy. When adding a region checkpoint, TestComplete asks to select the object or object region by using the finder tool or selecting a rectangular region of a window. This is the baseline copy stored in the project. TestComplete also gives you more options for image comparison like pixel tolerance, color tolerance and mask.

Table Checkpoint: This is used to validate data of a tabular control like a grid or a combobox. When you add a table checkpoint, TestComplete asks you to select the data to be validated, that can be the data within an object or a table variable stored in the project. TestComplete also gives you the option to compare only the first n number of rows or compare only some of all the columns.

Web Accessibility Checkpoint: This checkpoint is used to find out if a web page is accessible meaning that it has no broken links, has ALT text for images and so on. When adding this checkpoint, TestComplete asks you to select a web page and then select all the accessibility checks that you want it to perform on this web page.

Web Comparison Checkpoint: This is used to compare two webpages. When you add this checkpoint, TestComplete asks you to specify the web page. This can be done by using the Finder tool. Then it asks you to specify the comparison mode. The available modes are the entire page, only the tag structure or only the specified tags.

Web Service Checkpoint: This checkpoint is used in the functional testing of web services. It compares the web service's method response with a stored baseline XML data. When you add this checkpoint, TestComplete asks you for the web service, a particular method of this web service, the parameters of the method and the expected response of the method.

XML Checkpoint: This is used to compare two XML documents. When adding this checkpoint in TestComplete, it asks you for the file name and path or the URL of the baseline XML document. You can also specify the comparison options such as Ignore node order or Ignore attributes. At run time, TestComplete gets the XML document and compares it with the stored baseline.

One thing is common to all the checkpoints. If you want to change the baseline data stored in any checkpoint, right click on the checkpoint and open the checkpoint's data editor and change the stored data there.

1 comment:

Note: Only a member of this blog may post a comment.