How to test web services

How to test web services?

In the third part of Web Services testing tutorial, we are going to discuss – how to test web services? Web services are integral part of any enterprise application that makes testing of web services important. In this article, we are going to discuss the manual testing approach for web services.

(In Web services Testing Part I & Web services Testing Part II, we discussed about Web services and SOA fundamentals)

Web Services Testing

Web services testing poses slightly different challenges as compared to testing of a web application. There are no screens available and that makes manual testing of web services a little cumbersome as compared to other forms of testing. In this article, we are going to explain the manual testing approach for testing web services.

Web services can be used in a web application or a desktop application. A UI screen may use the web services to get values or perform some tasks asynchronously.

 How to test web services

Web services are part of a software development project and they are developed as independent units. Testing a web service independently will involve testing of functionality of the web service. This form of testing is very similar to functional testing of any screen. We can create the test cases comprising of test data and conditions.


Let’s take an example web service to test it. W3 Schools provide some sample web services like Celsius to Fahrenheit conversion and vice versa. We have used CelsiusToFahrenheit web service for this article. When you click on this link, you will see the default interface of the web service, if web service is created correctly.

This page also shows the request and the response format. If you look at the request format, you can see the following section in the SOAP request:


<CelsiusToFahrenheit xmlns=””>




Preparing Test data for testing web service

There is just one input data required and that is <Celsius>. The web services interface, by default, presents this field to input the data and test it. To test this web service, lets create some test data. I am sure you must be remembering the formula for conversion:

T(°F) = T(°C) × 1.8 + 32

Using the above formula, we create the following test data and expected results. You can notice that I have used both positive and negative test data.

Test Data

(Temp in Celsius)

Expected Result Actual Result
0 32  
10 50  
-25 -13  
100 212  

Preparing Test cases for testing web service

Using the identified test data, we can prepare test cases for testing the web service with valid and invalid data. Some of the test cases are shown below:

How to test web services

To test the web service, simply enter the input values and click on “Invoke” button. You can see the result as shown below:


In the next part of this how to guide, we are going to discuss the automation testing approach for testing a web approach.

What’s Next?

In this tutorial, we explained how to handle iFrames with Selenium Webdriver. You can go and read more Selenium tutorials published on this blog.

Are you looking to become an Automation tester and learn Selenium?

Techcanvass offers Automation Testing and Business Analysis certification courses. We are an IIBA endorsed education provider (EEP), iSQI Germany Authorized Training as well as Agile Testing alliance partner for CP-SAT certification training in Selenium.

We offer Selenium training with JavaSelenium Training with PythonCP-SAT certification Training and many short courses on Automation – BDD Automation testing with CucumberContinuous Integration Training with JenkinsAutomation testing Frameworks Training and Continuous Integration with Jenkins, Maven and GitHub.

One of the key features of our courses is the Job readiness package, as shown below: