This page shows how to test a deployed service that was generated via the Swagger Editor in the SOAJS Dashboard.
After you generate a service, fill its business logic and push it to your remote git repository:
Login to the dashboard UI
Head to Develop → Repositories and activate it. To learn more about Repositories, click here.
Head to Manage → Productization, create your product, your packages and add your ACL. To learn more about Productization, click here.
Head to Manage → Multi-Tenancy, create your tenants and add your ACL. To learn more about Multi-Tenancy, click here.
Head to Deploy → Repositories and deploy it in the environments you desire. To learn more about Repositories, click here.
Head to section Develop → API Catalog, you will see the swagger logo next to each service created using Swagger Editor
Click on the swagger logo so you can test your APIs
Push your code to master branch in case you deployed your microservice manually so the system can access your code on git.
Do not forget to activate your service in the Repositories module in Develop pillar and do not forget to deploy it in Repositories module in Deploy pillar.
Service APIs testing
Testing the Service
In the testing page, we will fill a drop down that contains the environments where you deployed your service.
Choose the environment where you want to test your service and the dashboard will:
return the available tenants of the selected environment filled in a drop down list
fetch your YAML code from the remote git repository
place it in the editor on the left side as read only mode
render the APIs documentation on the right side and provide you with the ability to test them
Every time you change the environment value, a new YAML code is pulled. This way if you have more than one version of this service deployed in multiple environments, you can test all of them.
Example 1: dashboard environment
Example 2: dev environment
Once the YAML file is rendered in the right sidebar, you can interact with the testing engine.
Choose the tenant you want to use to access your APIs.
Click on the API you want to test; it will expand, fill the parameters and press on Try it out.
A request will be be made to the following URL http://your_environment_api_domain/serviceName/API
The response returned from the API is based on what you wrote in its business logic.
When using the testing engine, the requests made are made to the actual deployed service. There is no simulation in this case; if you insert, update and/or delete records, you are actually executing that operation; there is no Undo.
If your service is multitenant or requires logged in user to invoke its APIs, make sure you have permissions to use this service in the environments you have it deployed.