As more companies make the shift towards DevOps, continuous integration (CI), and continuous deployment (CD), test feedback needs to be quicker than ever. As you scramble to make sure applications are ready to ship, API testing is one of the most critical parts in SDLC. Hence, testing should be carried out for every release or any change in the code. Manually repeating these tests is time-consuming, therefore required multiple resources, which increase the cost too. To overcome this hurdle Xoriant came up with a solution and developed iWAT - “An Automation Tool for API Testing & Webservices”.
This tool can regress the API testing during development cycles to ensure quality at the early stage. This tool will reduce the time to run repetitive tests from days to hours. A time saving that translates directly into cost savings. This tool helps the user to perform functional verification of SOAP and REST APIs for GET, POST, PUT and DELETE requests plus some extra features that can be taken advantage of to enhance your API testing efforts. For example:
- This tool works with excel files, which allows your teams to quickly create unique parameter values for your API tests.
- It also integrates with Jenkins, which means you can include your API tests in your CI pipelines.
To run, one should set the environment by configuring “ .properties” file in the beginning. Adding to the features of this tool there are options for putting the value of the mandatory fields (the values which should not be duplicated E.g. – Unique ID).
Test case creation managed using excel spreadsheets, there are separate spreadsheets for SOAP & REST requests. The user should just fill in the required data for the tests, then the tool manages which tests to be executed and produced the test result. Also, it logs test execution and stores test responses at the configured folder.
Figure 1: SOAP API Template
Figure 2: REST API Template
This tool provides some additional and advanced features over the other tools and frameworks available like Rest Assure and Soapbox, below are some of the features:
- Optimized implementation of designs for SOAP and REST API
- Full regression and functional verification of web service & API testing
- Provides a detailed report of the test case executions
- Logs all the data in a log file
- Stores every test case and its response for future use
- It can integrate with CI/CD environment for continuous testing
- It also stores the execution time of each test case in seconds.
- Also, for Rest API we have already implemented the functionality of authentication so that any webservice with auth token can be tested.
The Framework Design has three layers:
- Layer 1 comprises of all the configuration part, designing of test cases, providing the required data. Configuration is a one-time activity for the user.
- Layer 2 is the main working layer in which all the executions and processing will take place. It will iterate the no. of times as that of the no. of test cases.
- Layer 3 will be the response and result layer. All the required results will be obtained from this layer.
Below is the Framework Design:
Figure 3: Framework Design
This tool is designed considering that a novice user, who doesn’t have any prior knowledge of programming but well versed with web service concept. The user needs to configure the tool according to his requirement, and he is ready to go after drafting the test case in the Excel file.
If we use this tool frequently we can easily create and maintain the test reports in excel with the help of single click execution, while notifying the stockholder after execution. End of the day this will increase the "Return of Investment” drastically.
We used this application for 500 test cases (250 for SOAP API and 250 for REST API) to be executed at a time. So, if we do this manually for each test case we may take up to 2-3 mins depending on the test case. Hence, for 500 test cases manually it takes around 18 hours to complete the task. Whereas using this application this is done only in 30-40 mins and saving us 17 hrs per cycle which is a drastic save. Just imagine the time it could save if used frequently.
To download the tool:
GitHub Link: Github.com