Jmeter the WebService interface test

I. Introduction 

1, JMeter3.2 former version, you can use SOAP / XML-RPC Request plug directly webservice interface, version 3.2 of this interface has been canceled, an additional method to be tested.

2, Web service in general is to use the SOAP protocol to call it by HTTP, in fact, he is a WSDL document, the customer can read the WSDL document to use the Web service.

SOAP Simple to understand, this is an open protocol SOAP = RPC + HTTP + XML: using HTTP as the underlying communication protocol; RPC call as a way of consistency, XML as the format for data transfer, allowing service providers and customer service through the firewall communication interaction INTERNET.

So in fact we can through a number of methods to test the webservice through, http request jmeter in.

Second, the use jmeter in the http request testing

Weather forecast interfaces used here to test:

URL test: http://ws.webxml.com.cn/WebServices/WeatherWS.asmx

Test Interface: getSupportCityString

Obtaining coding city: http://ws.webxml.com.cn/WebServices/WeatherWS.asmx/getRegionDataset

Currently there are soap1.1 WebService protocol and soap1.2 version.

As used herein soap1.1 to be a demonstration.

Here input parameters: theRegionCode = cities, national ID or name, return data: a one-dimensional array of strings.

1, the following is an HTTP GET request and response.

jmeter interface calls the example below, Hebei parameters:

Note : http header information management needs to be filled is not filled SOAPAction Content-Type (required) or SOAPAction, and.

 

 

2, the following is a HTTP POST request and response .

jmeter interface calls the example below, Hebei parameters:

Note : Here and get the Content-Type is not the same, do not forget to modify.

 

See the result tree and returns results of the two request methods are shown below:

 

 

 

Guess you like

Origin www.cnblogs.com/wuzm/p/10908429.html