Forum Discussion

hoze's avatar
hoze
Occasional Contributor
10 years ago

What is the advantage of using SWAGGER plugin for API testing?

Hello,

 

We are using SOAP UI Pro 5.1.0 for API testing. During stakeholder review, we got a comment asking the testing team to use SWAGGER defination in building testcases in SOAP UI.

I referred to the material/videos in SOAP UI repository to understand added value of SWAGGER plugin.

Below is my understanding:

 

"Swagger plugin helps in creating API documentation by ‘Export Swagger’ functionality. Here from the URI definition, Swagger Spec can be generated and used in Swagger UI by development team to maintain API documentation.

 

1) From testing perspective there is no significant difference in creation of tests if I use Swagger definition during SOAP UI project creation. All the test steps in testcase are similar to SOAP UI project created by using URI for REST APIs.

 

2) Swagger definition can be used here if Development team is using Swagger for maintaining the API documentation and provides testing team the same."

 

So apart from playing a significant role in API Documentation, what are other features that are significant for the testing team?

  • Hi, Swagger can help in a number of ways.

     

    First, once you have a swagger definition, it's faster to create test cases inside SoapUI and Ready! tools.  You'll know all the paths, parameters, and expected payloads from the API.  This is done by importing the swagger definition.

     

    Next, as you mentioned you can leverage the work you've done on the testing team by exporting a Swagger definition.  With that, others in the organization can understand how the API works (you've helped describe it in the SoapUI test configuration process!) and even understand the coverage that your testing has against the server.

     

    There will be many more ways to work with Swagger in the future, please reply if you have further questions.