RESTful Web Services

RESTful Web Services

LoadRunner and Service Test support RESTful Web Services with Web (HTTP/HTML) protocol

Below is the sample script, created in LoadRunner to test RESTful web service:

web_reg_save_param("WCSParam_Text1",
"LB=",
"RB=",
"Ord=1",
"RelFrameId=1",
"Search=Body",
"IgnoreRedirections=Yes",
LAST);

//this does the service request
web_url("xml",
"URL=http://ecs.amazonaws.com/onca/xml?Service=AWSECommerceService&Operation=ItemSearch&AWSAccessKeyId=177RGZ1E5QEWTS8DBPG2&SearchIndex=Books&Keywords=Cortisol&Author=Jefferies",
"Resource=0",
"RecContentType=text/xml",
"Referer=",
"Snapshot=t1.inf",
"Mode=HTML",
LAST);

//this validates the result

soa_xml_validate ("StepName=XmlValidation_1",
"Snapshot=t3e218cbb28a34f019d7c76e541665794.inf",
"XML={WCSParam_Text1}",
"XSD=C:\\Documents and Settings\\ragoler\\My Documents\\WSDLs\\XMLValidation\\AWSECommerceService.xsd",
BEGIN_CHECKPOINTS,
CHECKPOINT,"XPATH=/ItemSearchResponse[1]/OperationRequest[1]/RequestId[1]","Value_Equals=aaa",
END_CHECKPOINTS,
LAST);

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