Once I tested one Restful web service project using POSTER tool based on the Unit Test Case Document. It almost copy and paste type of work but It has taken one day to finish the job. Then I decided to automate the testing using java library.

I need your reviews and suggestions on my idea before I started working on it.

INTRODUCTION

The restful web service testing is different from other testings like User Interface testing.  Restful web service output is in JSON or XML format. The tester should keenly compare expected output and original output. By automation of restful web service testing,  it is possible to reduce tester's effort and time to a considerable extent.

Manual Restful Web Service Testing

Tester uses browser tools to test the services (eg. Poster). Tester has to define the URL and method (GET/POST) and data to post. The tool will create a request to web service and will get the output and will print the output. Tester has to compare expected output and original output. This will take at least 8 minutes per service which is a hugely time consuming process. The accuracy level of manual testing is low.  

Architecture

Here machine will do testing for which it will need a proper procedure to follow. To create proper procedure it must have proper architecture.
The processes involved in the architecture are as follows:
  1. Tester will submit the input test case excel sheet to Master Tester.
  2.  Master Tester extracts information such as URL and method type and data to post and expected output data and  format of the output from the provided excel sheet.
  3.  Master Tester will create a request to webservice based on the input details and  it will get response data.
  4.  Master Tester will compare both the expected output and original output based  on the specified output format (XML / JSON).
  5. Master Tester will create output excel sheet with reports

Input Excel sheet format

Tester has to submit input excel sheet to system to get test reports. This input excel must be in defined format
The columns to be present in the excel sheet are:
  1.  S. No : Serial number for test case
  2.  Test Case ID : Unique identifier for test case
  3.  Test Scenario : Scenario of the test case.
  4.   URL : URL of the create request to webservice
  5.   Method : GET or POST
  6.   Input Data in case of post method
  7.   Expected output data
  8.   Output data format : (JSON/XML)
These columns must be in sequence.  

Output Excel sheet format

Master Tester will create output excel sheet.
The following columns must be in excel sheet.
       1.     S. No : Serial number for test case
       2.     Test Case ID : Unique identifier for test case
       3.     Test Scenario : scenario of the test case.
       4.     URL : URL of the create request to webservice
       5.     Method : GET or POST
       6.     Input Data in case of post method
       7.     Expected output data
       8.     Output data format : (JSON/XML)
       9.     Match or Mismatch : The result of comparison
               between expected output and original output.
       10.   Info : This is the system generated information for the
               test case.
This columns must be in sequence  

Advantages

Automation of restful web service testing saves  lot of time. For testing one web service tester has to take minimum of 8 minutes. Automatic testing can test one web service in one minute. If one tester has to test 100 web service test cases then that tester has to take 800 minutes but system can complete in 80 minutes. If tester enables parallel testing then it will take less than 40 minutes.
In manual testing the tester has to write everything manually from writing about the testing and should give additional information in case of failure test case scenario. In Automatic testing tester has to submit only input excel sheet so it saves lot of human effort.

Please Post Your Suggestions to improve this Idea.

Thank You

0 comments:

Search This Blog

Loading...

Follow by Email

Blogroll

Srinivas Dasari
find me on facebook
follow me on twitter

Popular Posts