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

Overview

Scenarios

When you use the local JMeter to perform a pressure test, various plug-ins are required to meet pressure test requirements. To view visual test reports, import JMeter projects to CodeArts PerfTest. CodeArts PerfTest supports the native JMeter engine. You can import JMeter scripts into JMeter projects in CodeArts PerfTest to quickly initiate high-concurrency performance tests with JMeter, and view complete performance test reports.

Solution Architecture

CodeArts PerfTest integrates the open-source Apache JMeter to implement pressure tests. The working principles are as follows:

  1. You can use CodeArts PerfTest resources to manage CCE nodes (one debugging node and one or more execution nodes) of the tenant. Then, a VPC endpoint is created to upload test data to CodeArts PerfTest. CodeArts PerfTest starts a resident debugging workload through CCE. The workload starts a CodeArts PerfTest container for debugging.

    If you use CodeArts PerfTest test resources for the first time, authorize CodeArts PerfTest to perform operations on CCE and VPC endpoint (VPCEP).

  2. Upload JMX scripts to CodeArts PerfTest before you use JMeter projects in CodeArts PerfTest. These scripts are stored in OBS buckets of CodeArts PerfTest. After the CodeArts PerfTest container is started, it downloads your scripts from OBS and executes them.

    If JMX scripts are deleted on the GUI, CodeArts PerfTest scripts stored in OBS are also deleted.

  3. During task execution, a temporary execution load is started through CCE. The load starts one or more CodeArts PerfTest containers based on the task scale for execution. If multiple containers are used for execution, threads in the thread group are equally allocated to each CodeArts PerfTest container.
  4. During task execution, the CodeArts PerfTest container uploads the test result to CodeArts PerfTest through VPCEP for the following purposes:
    • Collects performance metrics such as concurrency, latency, RPS, bandwidth, and TP90.
    • Displays request logs and return logs generated during execution.
  5. When the task is complete, the CodeArts PerfTest container is destroyed, and only execution records are stored in the executor.
    • The CodeArts PerfTest container integrates the open-source Apache JMeter, CodeArts PerfTest's control code, and some enhanced JMeter capabilities (such as multi-phase pressure configuration and log output).
    • By default, CodeArts PerfTest integrates Apache JMeter 5.4. You can upload a custom installation package to the CodeArts PerfTest resources to change the version to Apache JMeter 5.3 or 5.2. The custom installation package is a ZIP package downloaded from the Apache official website.
    • If you want to use third-party plug-ins, upload them in the form of third-party JAR packages to the JMeter project in CodeArts PerfTest. This is equivalent to placing JAR packages in the JMeter root directory \lib\ext.