Share this page

# lr_checkpoint

Validates the value of a parameter against an expected value (checkpoint).

    int lr_checkpoint( "StepName=<step_name>", "ActualValue={<input_param>}", "Compare=<operator>", "ExpectedValue={<checkpoint>}", "StopOnValidationError=<error_code>", LAST );

Alphabetical Listing - C Language Utility Functions

## Arguments

Name | Comments
--- | ---
StepName | The name of the step, as it appears in the test tree. Any text can be used.
ActualValue | Data to compare with the ExpectedValue argument. Can be a value or a parameter.
Compare | Operator used to compare the ActualValue and ExpectedValue values: Equals NotEquals Contains StartsWith EndsWith
ExpectedValue | Data to compare with the ActualValue argument. Can be a value or a parameter.
StopOnValidationError | Indication of whether all steps fail. Valid values: false: Steps do not fail. true: Steps fail.
LAST | This delimiter marks the end of the argument list.

The lr_checkpoint function validates the value of a parameter against a checkpoint value.

This function is supported only under the Windows operating system.

If the validation fails, the script aborts or continues, depending on the values of the StopOnValidationError argument and the `Continue on Error` runtime setting. The `Continue on Error` runtime setting takes precedence over the value of StopOnValidationError.

Operators are case-sensitive.

This function is not recorded. It can be added manually when enhancing the script.

## Return Values

This function returns LR_PASS on success and LR_FAIL on failure.

## Parameterization

All string arguments (char type) can be parameterized using standard parameterization.

## Example

In the following example, lr_checkpoint verifies if the first name of each row in a dataset matches the name "Joe". If a row does not match this first name, the script continues without ending on error.

        int i=1;
        lr_db_executeSQLStatement("StepName=PerformQuery", "ConnectionName=db1",
        "SQLStatement=SELECT dbo.Customer.CustID, dbo.Customer.FirstName, dbo.Customer.LastName FROM dbo.Customer",
        "DatasetName=MyDataset", LAST );

        while (i<4) {
            lr_db_getvalue("StepName=GetValue", "DatasetName=MyDataset",
                    "Column=FirstName",  "Row=next", "OutParam=MyOutputParam", LAST );

            lr_output_message("The value is: %s", lr_eval_string("{MyOutputParam}") );
            lr_checkpoint("StepName=VerifyCheckpoint", "ExpectedValue=Joe",
            "ActualValue={MyOutputParam}", "Compare=Equals", "StopOnValidationError=false", LAST );

            i=i+1;
        }

Tips to improve your search results... VuGen Function Reference Version 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: