Using a tool or writing code to send request and validate the responseSuppose we want to test a WebService which provides Currency Conversion Facility. In case you have such a requirement, just add an HTTP Header Manager to your sampler as follows. Header refers to supplemental data placed at the beginning of a block of data being stored or transmitted like content type, HTTP version, user agent, etc. Now you’re ready to go.Note: There might be some cases where you need to specify headers to your web services. In this example, Add is an operation and it takes two integer parameters with intA and intB as variables name.Implement a POST RequestLet’s implement a POST request to one of the supported operations.Change the Path to /calculator.asmx and send below payload with it as seen in the picture: 205Implement the other services by following the first example. If you take a look at the response, you’ll be able to see the operations name and parameters to send to these services. Fill the path as calculator.asmx?WSDL ( web services description language). This is the first web service call.Add a View Results Tree Listener into your test to analyze the results.Run your test and you will receive a response from the web service.
0 Comments
Leave a Reply. |