Action ()
{
Char check[];
int login;
Lr_rendezvous ("login");
Lr_start_transaction ("login");
Web_reg_save_param ("Check", "lb=km", "rb=\x00", last); Registration function, looking for "need maintenance" information
Web_custom_request ("Test",
"Method=post",
"Url=http://192.168.xx.xx:8001/test",//Request address
"Reccontenttype=application/octet-stream",
"Enctype=application/octet-stream",
"Mode=html",
Raw_body_start,//identifier for request BODY start
"{\" userids\ ": [1300000001,1300002029,1300003163],\" type\ ": 0}",
"{d5f8011001002c000000cccccccc100011006168777577656e6b75690065}",
64,
Raw_body_end,
last);
Check={login};
Lr_message ("check=%s", check);
Lr_message ("login=%s", lr_eval_string ("{check}"));
if (strcmp (lr_eval_string ("{check}"), "Requires maintenance") ==0)
{
Lr_message ("Pass");
login=0;
}
Else
{
Lr_message ("fail");
Login=1;
}
Lr_end_transaction ("Login", login);
return 0;
}
LoadRunner test POST Request Interface test Case script (1)