Sunday, May 1, 2016

How to use Ready! API to test APIs published in WSO2 API Manager

In this post I'm going to explain on how we can use the Ready! API(SmartBear Software) to test API's that are published in the WSO2 API Manager.

WSO2 API Manager


WSO2 API Manager is a 100% opensource solution for designing and publishing APIs. It also has the capability to create and manage a developer community. The core of the WSO2 API Manager is created using the WSO2 Enterprise Service Bus, Identity Server and Governance Registry components.

Ready! API


Ready! API is a product that is developed by SmartBear software which includes a platform of tools such as SoapUI NG Pro, LoadUI NG Pro, Secure Pro and ServiceV Pro that can be used to effectivly test API functinality. A more detailed description about these products can be found using their product page.


This post focus more on the Ready API Plugin usage and not WSO2 API Manager product functionalities. If you are new to WSO2 API Manager, I suggest you to go through our product page and documentation to get an idea about what WSO2 API Manager is and how to use it.


Ready! API has an extension point where people can create a plugin and alter the behavior of the product. WSO2 Team has created a plugin(named WSO2 API Manager Plugin)  for Ready API which helps the users to Integrate and Test their APIs that are visible in the WSO2 API Store. This blog post focuses on describing the features and advantages of the plugin.


WSO2 API Manager Plugin


Installation


The WSO2 API Manager Plugin is published in the Ready API Plugin repository. Hence installing the plugin can be done using following a simple set of steps. 

  1. Navigate to the Plugin Manager.
  2. Click on  "Browse Plugin Repository".
  3. Select the "WSO2 API Manager Integration" Plugin and click Install.
The following screenshot shows the above mentioned steps.




Usage

Once the plugin is installed, there are multiple ways to get the advantage of the plugin.

1. Create a project by importing a new API.
2. Add a new API to an already existing project.



When using both of the above mentioned options, you would see a prompt to enter the API Store connectivity details. What we need to do is to fill in the details and press the "OK" button. Note that the tenant domain field is not required if you are connecting to the super tenant store as the plugin will connect to the super tenant store if the field is not specified. 



After the above step, the plugin will connect to the API Store(give by the user) and list out all the APIs in its API list prompt.



The user only has to select the API(can select multiple APIs) and whether to create a test suit and a load test for the API. The plugin will connect to the API Manager instance using the REST APIs of the API Publisher and Store and will create a project by reading the swagger definition of the API(or APIs). The final outcome would be something similar to the following.


As you would notice, the plugin reads the Swagger definition and create a project with the sample requests. The plugin also creates an OAuth2 authorization profile with the name "wso2-api-manager-default" so that the end users would only need to give the OAuth2 token that they generated from the API Manager Store.

Once the API import is complete, the usage of the plugin is really simple. The user only needs to give the OAuth2 token to the "Access Token" field and fill in the necessary request parameters before invoking the sample request.

The response would look like what is stated in the image below.


As shown in the above steps, you could import any number of APIs from the API Store and test them using the Ready! API. Similar to the project created in SoapUI NG Pro, there would be projects created on LoadUI if the user has selected that option when importing the APIs.

Summary


The WSO2 API Manager plugin in the SmartBear plugin repository was developed to have a seamless experience when testing the APIs published in the WSO2 API Manager using Ready! API Platform. In summary the current plugin supports the listing of APIs in the given Store, creating sample requests for the selected APIs by reading their Swagger definitions and create test suits and load tests if that option was selected and many more features.

For more information about the plugin usage, please refer to this article and the Github project for the plugin.

1 comment:

  1. Process server

    Thank you so much Process server and best Process server court filing services at affordable prices.

    ReplyDelete