Skip to main content Skip to complementary content

Testing the microservice

Use Talend Cloud API Tester to test your deployed microservice.

Before you begin

You have installed the Talend Cloud API Tester Google Chrome extension. For more information, see the Talend Cloud API Tester User Guide.

Procedure

  1. Open Talend Cloud API Tester and click the Project button in the bottom of the left panel to create a new project.
  2. Enter a name for your project, DemoREST for example, and click Create.
  3. Click Add an environment in the top right corner of the window to create a new environment named DemoREST-VM1.
    This will allow you to create an environment variable for your base URL to avoid changing it directly in the requests.
  4. Enter baseURL in the Name column and the relevant URL in the Value column.
    In this example, enter http://<DemoREST-VM1>:5066/services and replace <DemoREST-VM1> with the public IP address associated with your virtual machine.
    The baseURL environment appears in the Environment variables list.
  5. Optional: Create an environment for DemoREST-VM2:
    1. Click Add an environment and enter a name.
    2. Select the Copy variables from check box and select DemoREST-VM1 in the drop-down list.
    3. Click Create.
    4. Update the Value column for the baseURL with the relevant IP address.
  6. Click Close.
  7. Click Add a request to create a request named Get all customers, then open the request and enter the following URI: ${"baseURL"}/customers.
  8. Click Save, then click Send to send the request.
    The list of customers is returned.
    In the Get all customers Requests submenu, under the Response tab, the list of customers appears.
  9. Create a second request:
    1. In the left panel, open the menu next to your request and click Copy.
    2. Name the request Get a single customer and click Copy.
    3. Open the request and add /1 at the end of the base URL.
    4. Save and send the request.
    In the Get a single customer Requests submenu, under the Response tab, the first customer of the list appears.

Results

You have created environments and requests to test your microservice. You can send the requests multiple times on each environment and check the metrics on Talend Management Console.
Execution of the Remotes Engines in the Deployments tab of the DemoREST task page.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!