What is Web Service?
Well, it is someone service that you want to use through web/online. It might be your company internal service, outside services like weather.com Service, Google maps service etc.
Many organization are dividing the huge application to micro services. Which helps the application developers to quickly upgrade the service and push the change to the production.
Following are the detail steps that you need to follow in order to test the micro services.
Types of Services:
We have mainly four types of Web Services XML-RPC, UDDI, SOAP and REST. See the details explanation in this link which is very helpful
Your company will have different branches like Online Order, Delivery and Pickup.
While doing online order you want to use Delivery service, so you are indirectly using Delivery service.
Delivery Service team gives you details about their service and you call that service every time you want Delivery.
- Is delivery team did the performance test for that service,
- How many concurrent calls it supports? What is the response time SLA for that service?
- Which protocol works Best for Web Services Load test?
Before handing over to other people Delivery Service team has to do performance test and see how fast their service responds and how many concurrent calls it supports.
The Performance Test Goal of any web service is Concurrent Calls and Response time.
You want to use Weather Service in your application to display current weather in your location. Usually these services are charged based on number of calls you are making in a day.
Before Handing over the weather service the Weather Service Company will do performance test with huge concurrent calls and concludes that my Weather service supports 10000 concurrent calls per second and it responds within 0.5 seconds.
Performance testing Goals for Web Service
What Questions do you ask to Developer, Project Manager or Business Analyst Before Starting Performance Test?
Answer: How many concurrent calls this service has to support in production?
Developer Answer Example: My service should load in 0.5 sec with 100 concurrent calls.
So How many concurrent users that you need to use?
Answer: It depends on the service responding, you need to adjust your concurrent users in such a way that you meet your 100 concurrent calls.
Web Service Scripting
There are two different ways that you can do scripting in Loadrunner, one is using Web Service Protocol and the other is Web Protocol.
If it is a simple get request you can using web protocol.
If it is a WSDL file the best way to do is using Web Service Protocol
Scripting Using Web Service Protocol with SOAP WSDL File
I am taking the following URL as an example WSDL File, the response you get is saying Hello Your Name.
How to do the scripting using WSDL File in Web Service Protocol
Open VuGen and Select Web Service Protocol
Click on SOA Tools on Top bar and Select Manage Services
Click on Import and give the WSDL URL – http://www.learnwebservices.com/services/hello?WSDL
Click on Apply and Okay.
Go to SOA Tools Again and click on Add Service Call – Expand Hello Request and Give your name.
And run the script you will see in the response saying Hello Vijay.
lr_output_message(lr_eval_string("Print my Name =
How do you do Text Check in Web Services or Capture Values
You will use lr_xml_find function or lr_xml_get_values function to do validate the response and capture the values.
Correlation in Web Service Protocol
To correlate any values in xml you need to use lr_xml_get_values
Scripting Using Web Protocol Web
You can use the web protocol the following way and you can use web_reg_save_param function to correlate the values.
You can also read our additional Loadrunner Tutorial