All Products
Search
Document Center

Compute Nest:Test a service

Last Updated:Sep 09, 2025

After you create and save a Compute Nest service as a service provider, you must test the service and submit the service for review after the service passes the test. This topic describes how to test the availability and template of a service as a service provider.

You can manually test a service or perform an automated test on a service based on your business requirements.

  • Manually test a service: You can use the deployment URL of the service to deploy a service instance within your account as a customer.

  • Perform an automated test on a service: You can create test cases based on different templates and verify the accuracy of the templates by creating and running test tasks. Test cases are inherited when a new version is created for the service. This facilitates regression testing and ensures the accuracy of service iteration. In addition, the test case is associated with the service review process. When you submit the service for review, the test case is automatically triggered to test the service.

Manually test a service

Use the deployment URL of a service to create a service instance within your account. This verifies the operations performed to deploy a service instance.

Note

To apply for a trial of cloud resources for service testing, see Configure a free trial.

  1. Log on to the Compute Nest console.

  2. Go to the My Services page and find the service that you created. Click the service name to go to the Service Details page.

  3. On the Service Details page, click the Service Test tab and then click the test URL to go to the Create Service Instance page.

    On the Create Service Instance page, test the parameters of the service instance.

  4. Return to the Service Test tab of the Service Details page. After the test is complete, the "The test is successful" message is displayed on the Service Test tab.

Perform an automated test on a service

Create a test case and customize the parameters of the service template in the test case. The created test case is associated with the service review process. The test case is automatically triggered to test the service when you submit the service for review. The test case is inherited when a new version is created for the service. When a service is updated or a service instance is upgraded, the new version of the service inherits the test case of the old version of the service. This facilitates regression testing.

Note

If you do not create a test case, no automated test is triggered when you submit the service for review.

Configure a test case

A test case configuration file is a YAML file. In this example, the test case configuration file of the consul service is used.

---
parameters:
  SystemDiskSize: 100
  PayType: "PostPaid"
  DataDiskSize: 40
  InstanceType: "$[iact3-auto]"
  AllocatePublicIp: "true"
  DataDiskCategory: "cloud_efficiency"
  InstancePassword: "$[iact3-auto]"
  SystemDiskCategory: "cloud_essd"

You can also click Import Default Configurations in the Add Test Case dialog box to import the default test case configuration file of the service. The parameters in the default test case configuration file are parsed based on the parameters defined in the service template.

Parameters

The following table describes the parameters in the service template.

Parameter

Required

Description

specificationName

No

The name of the parameter set.

The parameters in a parameter set cannot conflict with the parameters defined in the parameters section.

parameters

Yes

The parameters used to execute a Resource Orchestration Service (ROS) template in a service test.

Important
  • The InstanceChargeType parameter must be set to PostPaid.

  • The $[iact3-auto] pseudo parameter is automatically set to an optional value. The defined cloud resources are automatically selected from the resources available in the current region. For more information, see the Pseudo parameters section of this topic.

  • The virtual private cloud (VPC), zone, vSwitch, and security group attributes that are strongly associated with the region attribute are automatically generated when the test task is run. You can customize the attributes.

Create a test task

Select a template and a test case in Compute Nest within your account to test the service.

  1. In the Test Tasks section, click Create Task. In the Create Task dialog box, configure the task information.

    1. Enter a task name in the Task Name field.

    2. Select a template and a test case.

      If multiple templates are available, you can create a test case for each template.

    3. Select the region in which you want to run the task.

      If you do not select a region, the system randomly selects a region from the regions in which the service can be deployed.

  2. Click Create Now.

    After the task is created, you can view the task progress in the task list.

  3. View the execution report.

    After the task is complete, you can view the test configurations and test case information in the execution report.

    1. Click the 2023-10-19_16-30-06.png icon next to the name of the test task, and then click Details.

    2. In the Test Report dialog box, view the test configurations, region, and stack of the task.

  4. View logs.

    In the logs, you can view the effective parameters, stack details, and error information.p729063.png

Errors and solutions

This section describes the common errors that may occur during a service test and provides solutions.

  • Error log: "IacerException, can not find any available value for ZoneId in cn-qingdao region in [] for default"

    Solution: No resources are available in the current region. You must specify another region to run the task.

  • Error log: "Resources.TiDBServerScalingGroupEnable.Properties: : Unknown Property DetachOptions request id: 51341F62-56DC-xxxx-xxxx-xxx"

    Solution: The parameters defined in the template are invalid. Modify the parameters in the test configurations based on the log.

Pseudo parameters

The $[iact3-auto] pseudo parameter can be used to automatically specify values for parameters. This simplifies the parameter settings during a service feature test. You can use pseudo parameters to configure parameters in the following two cases:

  • The values that can be specified for a parameter can be queried by calling an API operation. If you call the GetTemplateParameterConstraints operation for a parameter, AllowedValues is returned.

  • A parameter specifies a specific resource or an item. In this case, the pseudo parameter automatically obtains an appropriate value for the parameter.

    • If the parameter is VpcId, VswitchId, or SecurityGroupId, the pseudo parameter automatically selects a VPC ID, a vSwitch ID, or a security group ID for the parameter in the current region.

    • If the parameter is VpcName, Password, or Uuid, the pseudo parameter randomly generates a VPC name, a password, or a UUID for the parameter.

    • Pseudo parameters support the following parameters:

      • If a parameter matches the regular expression vpc(_|)id, the pseudo parameter automatically selects a random VPC ID for the VpcId parameter in the current region.

      • If a parameter matches the regular expression v(_|)switch(_|)id, the pseudo parameter automatically selects a vSwitch ID for the VswitchId parameter in the current region. If a parameter matches the regular expression zone(_|)id, the pseudo parameter automatically selects a vSwitch ID in the corresponding zone.

      • If a parameter matches the regular expression security(_|)group(_id|id), the pseudo parameter automatically selects a security group ID.

      • If a parameter matches the regular expression r'\w*name', the pseudo parameter automatically generates a random string that starts with iacer-.

      • If a parameter matches the regular expression r'\w*password', the pseudo parameter automatically generates a password that contains uppercase letters, lowercase letters, digits, and special characters.

      • If a parameter matches the regular expression r'\w*uuid', the pseudo parameter automatically generates a UUID.