background image
<< Verify Playback Return Codes | Bind Output Parameters to VU Variables >>
<< Verify Playback Return Codes | Bind Output Parameters to VU Variables >>

Verify playback row counts

Setting Recording Options
6-18
Depending on your
Verify playback row counts
Verify playback row counts
Verify playback row counts
Verify playback row counts
and
Verify playback return codes
Verify playback return codes
Verify playback return codes
Verify playback return codes
selections, Robot generates the SQL statement in one of the following ways:
Because one SQL statement can return multiple error messages (for example, as a
result of stored procedure execution),
EXPECT_ERROR
is an array. During
playback, if an error code is returned that is not one of the values specified in the
array, TestManager generates an error.
Check Box
Selected
VU Command and Meaning
Neither
sqlexec ["x001"] "INSERT INTO mytable VALUES
('value1', 'value2')";
During recording, Robot does not report the data it collects from the
execution of the SQL statement. During playback, TestManager
assumes that any nonzero return code is an error. It pays no attention
to the number of affected rows.
Verify playback
return codes
sqlexec ["x001"] EXPECT_ERROR {-212}, "INSERT
INTO mytable VALUES ('value1', 'value2')";
Robot records that error code -212 was returned from the SQL
statement. During playback, TestManager expects the SQL statement
to return the error code -212. If the SQL statement returns a different
code during playback, the Test Log window notes the discrepancy.
Verify playback
row counts
sqlexec ["x001"] EXPECT_ROWS 1, "INSERT INTO
mytable VALUES ('value1', 'value2')";
Robot records that one row was affected by the SQL statement.
During playback, TestManager expects the SQL statement to affect
one row. If the SQL statement returns a different count during
playback, the Test Log window notes the discrepancy.
Both
sqlexec ["x001"] EXPECT_ERROR {-212},
EXPECT_ROWS 0, "INSERT INTO mytable VALUES
('value1', 'value2');
Robot records that the SQL statement returned the error code -212,
and that no rows were affected. During playback, TestManager
expects the SQL statement to return error -212 and that no rows will
be affected. If the SQL statement returns different results during
playback, the Test Log window notes the discrepancy.
NOTE: This option is not supported for VB scripts.