Updated on 2024-01-15 GMT+08:00

Procedure

Test Resource Groups and Their Constraints

  • Test resource groups are classified into shared resource groups and private resource groups. Shared resource groups are provided by the system by default, and private resource groups need to be created.
  • Execution nodes of the shared resource group have been bound with an elastic IP address (EIP). When the tested application has network access restrictions, use a private resource group.
  • A shared resource group supports a maximum of 1000 concurrent users and 100 Mbit/s bandwidth. If higher concurrency or bandwidth is required, use a private resource group.
  • JMeter test tasks can use only private resource groups. A JMeter test task allows a maximum of 2 million concurrent requests.

Preparing Test Resources

  1. Log in to the CodeArts PerfTest console, choose Resource Groups in the navigation pane, and click Create Private Resource Group.
  2. (Optional) If this is the first time you create a private resource group, grant CodeArts PerfTest permissions necessary for creating private resource groups.
  3. If you do not have a CCE cluster, perform 4 to create one before creating a resource group. If a CCE cluster is available, go to 5 to create a resource group.
  4. Create a cluster.

    Click Create Cluster. The page for buying CCE clusters is displayed. For details about how to create a cluster, see Buying a CCE Cluster.

    • The cluster management scale is related to the number of execution nodes. Create nodes of the corresponding specifications based on the number of concurrent users for pressure testing. For example, if 20 execution nodes are required, you can set the cluster scale to 50 nodes.
    • You are advised to select Tunnel network as the network model. Container CIDR Block and Service CIDR Block must be the same as those of the tested object.

    Click Next: Add-on Configuration. Retain the default settings.

    Click Next: Confirm. After confirming that the cluster configuration information is correct, select I have read and understood the preceding instructions and click Submit. It takes about 6 to 10 minutes to create a cluster.

    After the cluster is created, return to the Cluster Management page and click in the row where the cluster for which you want to create a node is located. The Create Node page is displayed. For details about how to create a node, see Creating a Node.

    • A node must have at least four vCPUs and 8 GB memory.
    • Select EulerOS as the operating system.
    • At least two nodes (one debugging node and one execution node) are required. The number of nodes depends on the specifications of the pressure test object. For example, 21 execution nodes (one debugging node and 20 execution nodes) are required for 100,000 concurrent users and 4 vCPUs | 8 GB memory.
    • If the CCE cluster node and the application to be tested are not in the same VPC network, bind an EIP to the CCE cluster node. You can use existing EIPs. If no EIP is available, click Auto create to create one. When EIPs are automatically created, you are advised to pay by traffic and set the bandwidth to a large value to avoid affecting the pressure test. Additionally, an EIP with specified configurations is automatically assigned to each node. If the number of EIPs is less than the number of nodes, the EIPs are randomly bound to the nodes.

    Click Next: Confirm. After confirming that the node configuration information is correct, select I have read and understood the preceding instructions and click Submit. After the node is created, return to the CodeArtsPerfTest console.

  5. Create a resource group.

    Choose Resource Groups in the navigation pane, and click Create Private Resource Group.

    Set the parameters listed in Table 1.
    Table 1 Creating a private resource group

    Parameter

    Description

    Resource Group Name

    Name of the private resource group to be created.

    Debugging Cluster

    Select a CCE cluster from the drop-down list.

    Debug Node

    Select the management node that performs a pressure test.

    The debugging node cannot be changed after the resource group is created.

    Execution Node

    Select a pressure target machine that provides performance data during a pressure test.

    Click Create.

Creating, Debugging, and Starting a Task

  1. Log in to the CodeArts PerfTest console and select a region in the upper part of the page.
  2. In the navigation pane on the left, choose Dashboard. Click All-in-one Scene in the Hot Template to create a pressure test project.
  3. After the test project is created, its case details page is automatically displayed.

    Figure 1 All-in-one system pressure test project

  4. Select a test case and modify the parameters. For example, modify the request information in the Performance_limit scenario and click Save.

    Figure 2 Modifying parameters

  5. Click Debug, select the target test resource group as the executor, and click Start to start debugging. If an error was reported in the debugging result, edit the case based on the log information and debug it again.
  6. On the Test Tasks tab, click Create Task.
  7. Enter a test task name, click Add Case. On the page that is displayed, select the target case, and click OK. Click Save. The test task is created.

    Figure 3 Adding a case

  8. Click the start icon in the Operation column of the test task.

    Figure 4 Starting a task

  9. Select a resource group type and click Start.

Test Report Analysis

  1. After you start a test task, click View Report in the displayed dialog box to view the real-time test report.

    You can view the real-time monitoring data and chart reports of each metric during the pressure test.

  2. After the pressure test is complete, an offline test result report is generated automatically. You can view the report of the completed test task.
  3. You can also click Download report to download an offline PDF report to a local PC. Identify performance bottlenecks of the all-in-one system based on the report.