03 - Test service

Introduction


This page shows how to test a deployed service that was generated via the Swagger Editor in the SOAJS Dashboard.

Workflow


After you generate a service, fill its business logic and push it to your remote git repository:

  1. Login to the dashboard UI
  2. Head to Develop → Repositories and activate it. To learn more about Repositories, click here.
  3. Head to Manage → Productization, create your product, your packages and add your ACL. To learn more about Productization, click here.
  4. Head to ManageMulti-Tenancy, create  your tenants and add your ACL. To learn more about Multi-Tenancy, click here.
  5. Head to Deploy → Repositories and deploy it in the environments you desire. To learn more about Repositories, click here.
  6. Head to section Develop → API Catalog, you will see the swagger logo next to each service created using Swagger Editor
  7. 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.

List ServicesService 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:

  1. return the available tenants of the selected environment filled in a drop down list
  2. fetch your YAML code from the remote git repository
  3. place it in the editor on the left side as read only mode
  4. 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 environmentExample 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.

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.

Success responseError response