Oracle NCA Vuser Functions (NCA) > Alphabetical List of Functions > nca_set_iteration_offset


Example: nca_set_iteration_offset Session Functions

Sets an offset for an object ID.

void nca_set_iteration_offset( int offset );
offset The offset of the ID.

The nca_set_iteration_offset function sets an offset value for the ID number of an object. In normal recording for Oracle NCA scripts , VuGen records the name of each object (setting record=names in the start page). If your version does not support the record=names flag, VuGen generates a new ID number for each object. When you run multiple iterations of the script , each opening of an object generates a new ID number. Therefore, when you replay a script, the ID number for a particular object will not match the ID for the same object after the first iteration, causing the test to fail.

To prevent this failure, you can use the nca_set_iteration_offset function to indicate the offset of the object. This determines that at every interval of the offset (e.g., every 25 object IDs), the same object returns.

To determine the offset, you execute the script with an extended log. Review the extended log and locate a unique description or marker at the first and second locations of the object. Subtract the first object ID from the second object ID to obtain the offset value.

Return Values

No value returned.


You cannot use standard parameterization for any arguments in this function.