This topic describes how to create manual checkpoints in keyword tests. For information on how to insert manual checkpoints into scripts, see Creating Manual Checkpoints.
When you create a manual checkpoint with the Create Manual Checkpoint dialog, TestComplete generates script code that contains a call to the ManualCheck.Compare
method. To use the manual checkpoint functionality from within a keyword test, use the keyword test operations that will call the ManualCheck.Compare
scripting method from the test.
If you create a manual checkpoint during test recording, TestComplete automatically adds operations that call the ManualCheck.Compare
method to your keyword test.
If you create manual checkpoints at design time, add operations calling the ManualCheck.Compare
method to your test manually. For instance, you can use the Run Code Snippet or Call Object Method operation to call the ManualCheck.Compare
scripting method from your keyword test. Here is a possible scenario:
-
Select Manual Checkpoint from the Tools toolbar (if this toolbar is hidden, right-click somewhere in the toolbar area and select Tools from the ensuing context menu):
Use the subsequent Create Manual Checkpoint dialog to specify the instructions and save them to the Stores item of your project.
-
Open your keyword test for editing.
-
Add the Call Object Method operation to your test.
After you dragged the operation from the Operations list to your test in the Keyword Test editor, TestComplete will display the Operation Parameters wizard.
-
On the first page of the wizard, you specify the object whose method will be called. Enter ManualCheck into the edit box:
Click Next to continue.
-
On the next page of the Operation Parameters wizard you can choose the method to be called. In our case, the methods list contains only one item -
Compare
. Select it and click Next to continue. -
On the next page of the Operation Parameters wizard you can specify the parameters of the method. The
Compare
method has only one parameter -- checkpointName. Enter the name of the desired Stores element that holds the check instructions into the Value column: -
Click Finish to close the wizard and to add the operation to the test.
To check the results of the method call, use the [Last Operation Result] mode. For more information about this, see Checking Operation Result.
See Also
Manual Checkpoints
Creating Manual Checkpoints
About Manual Checkpoints
ManualCheck Object