Randomize a selected row with the Oracle 2-Tier function

Using VuGen 11.00 to test an Oracle 2-Tier application which has a result set returned based on various selections. As the VuGen script needs to perform an update it is important that Vusers select a unique record. The VuGen Oracle 2-Tier function lrd_ora8_save_col should allow this but there is no example on how to use a parameter in this function to determine which row needs to be selected.

For example: the x should become a random parameter in the following call:

lrd_ora8_save_col(OraStm1,1,x,0,"Saved_Requirement_String");

Try the following custom VuGen code. It randomizes the row accessed in GRID8 by substituting a value, e.g. 1,2,3,4 6, 10, etc defined in the script’s GridSel.dat parameter file.

<snip>

int=x;

x = atoi(lr_eval_string("{GridSel}"));

lrd_ora8_save_col(OraStm1,1,x,0,"Saved_Requirement_String");

lrd_ora8_fetch(OraStm1, -34, 300, &uliFetchedRows, PrintRow322, 2, 0, 0);

GRID8(322);

</snip>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s