Developers or testers need to call online services to debug deployed services or query online data during the development process. The service testing feature allows you to set the parameters to call a service, initiate service calls, and obtain the results of the calls in the Enterprise Distributed Application Service (EDAS) console.

Background information

  • The service testing feature is in public preview. You can use this feature free of charge.
  • If you test a service as a Resource Access Management (RAM) user, you must first grant the RAM user the permissions to test services in the RAM console. For more information, see Configure permissions for service testing in the RAM console.

Procedure

  1. Log on to the EDAS console.
  2. In the left-side navigation pane, choose Microservices Governance > Spring Cloud.
  3. In the left-side navigation pane of Spring Cloud, click Service Testing.
  4. In the top navigation bar, select a region. On the Service Testing - Select Service page, select a microservice namespace from the Microservice Namespace drop-down list. Then, click the name of a specific service in the service list.
  5. In the Interface metadata section of the Select Test Method panel, find the service that you want to test and click Test in the Request Path column.
  6. In the Test Service panel, set the parameters and click Run.
    Service Testing - Spring Cloud

    The following table describes the parameters.

    Parameter Description
    Call IP The IP address of an instance on which the service is deployed. The instance can be an Elastic Compute Service (ECS) instance or a pod. If the service is deployed on multiple instances, you can select only the IP address of one instance.
    Request Method The request method of the class to which the service belongs. If the class contains multiple request methods, you can select only one request method.
    Test Method The test method to use. In the Test Params section, set the parameters based on the service code.

Verify the test result

In the Result section, you can check whether the test is successful. The following list describes the types of test results:

  • The test failed, and the "The test engine is being initialized." error message appears. When you perform a service test, the test engine requires 30 seconds to 50 seconds to initialize. Therefore, you must wait for 30 seconds to 50 seconds before you perform another test. Test Service - Dubbo
  • The test is successful, and the response from the service appears.
  • The test failed, and the response from the service appears. You can troubleshoot the issue based on the response to determine whether the issue is caused by the port, network, or code of the service.