c - Load runner return value from function -


for whom using hp loadrunner, im newly using loadrunner vugen, use "web_submit_data" send specific request, want knw how can ensure request sent succsessfully. tried loadrunner there no details how deal returned values function. below lines i'm using in script. give me syntax errors.

            status = web_url("{webserverurl}",                 "url=http://{webserverurl}",                  "targetframe=",                  "resource=0",                 "reccontenttype=text/html",                  "referer=",                  "snapshot=t1.inf",                  "mode=html",                  last);               if (status==lr_fail)                 {              lr_end_transaction("pm_01_navigatetoweightwatchers", lr_fail);               lr_exit(lr_exit_main_iteration_and_continue, lr_auto);                 }             lr_end_transaction("pm_01_navigatetoweightwatchers",lr_pass); 

in code need declare 'status' int @ top of action() function if haven't done already:

int status;

also, 'if' in statement should lower case:

if (status == lr_fail) { // code }

with changes code posted should compile, may not capturing think capturing. 'status' returned telling whether function 'web_url()' executed successfully, , that's all. if page request returns error page code still considered success since function executed correctly. isn't telling content of page requesting it.

if want have @ response requesting page , determining if worked or not need either confirm presence of string ( web_reg_find() ) or correlate values in page. use function 'web_reg_save_param()' capture content out of requested page , write log file, write error handling around or use values later in script. function in files , study since learning correlation key getting started loadrunner.

good luck!


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -