Correlation • You can optimize Vuser scripts by correlating statements. VuGen’s correlated Query feature allows you to link statements by using the results of one statement as input to another. • The primary reasons for correlating statements are: – To simplify or optimize your code – For dynamic data – To accommodate unique data records. Krish Hegde
1
Correlation • When working with Database Vuser scripts, you can use VuGen’s automated correlation feature to insert the appropriate function into your script. • The correlating functions are: – Ird_save_col saves a query result appearing in a grid to a parameter. This function is placed before fetching the data. It assigns the value retrieved by the subsequent Ird-fetch to the specified parameter. – Ird_save_values saves the current value of a placeholder descriptor to a parameter. It is used with database functions that set output placeholders – Ird_save_ret_param saves a stored procedure’s return value to a parameter. It is used primarily with database procedures stored in DbLib that generate return values. Krish Hegde
2
Correlation • The main steps in correlating a statements are: – Determine which value to correlate – Save the results – Reference the saved values.
Krish Hegde
3
Correlating Database Vusers • • • •
Example of Correlated Vusers: Step 1:Create a Vuser for Oracle 2-tier protocol Step 2: Start recording the application under test Step 3: Enter the required values at run time and then end the recording. • Step 4: After the script is recorded, add parameters and replace these values with the parameters.
Krish Hegde
4
Debugging the web Vuser scripts • To assist with debugging a web Vuser script, you can view a report that summarizes the result of your script run. • VuGen generates the report when script execution is complete.
Krish Hegde
5
Filtering the Report • The report information generated can be filtered.
Krish Hegde
6
Debugging • Click on the debug toolbar, so that we can run the script step by step and then check for the results.
Krish Hegde
7
Win Socket • Win socket Vusers are used for network programming applications. Windows Socket Vuser functions begin with an Irs prefix. • Viewing Windows Sockets Data in script View: – When you use VuGen to create a Windows sockets Vuser script, your actions are recorded into three sections of the script. Vuser_init, Actions and vuser_end. – In addition to the Vuser script, VuGen also creates a data file, data.ws that contains the data that was transmitted or received during the recording session.
Krish Hegde
8
• Questions?
Krish Hegde
9