tencent cloud

Tencent Cloud Observability Platform

Environment Management

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2025-03-10 22:20:40

Overview

Environment management supports the users in creating different environment variable groups, where each variable group can contain different environment variables. During performance testing, environment variables can be used in performance testing scripts.

Environment Management

PTS supports creation, read, update, and deletion operations for environment configuration.

Environment Creation

Log in to the TCOP console, select PTS > Environment Management in the left navigation bar, click Create Environment , create the environment and variables, and save the settings.




Environment Editing

Log in to the TCOP console, select PTS > Environment Management in the left navigation bar, select the ID of the target environment, click

to edit the existing environment.




Environment Deletion

Log in to the TCOP console, select PTS > Environment Management in the left navigation bar, choose the target environment ID, and click Delete. You will be prompted with the associated testing scenarios. Then click OK in the pop-up window to delete.




How to Use

After creating the environments and variables, you can reference them in simple test scenarios and JavaScript scripts.

Script Mode

1. Log in to the TCOP console, select PTS > Test Scenarios in the left navigation bar, and click Create Scenario.
2. Select Script Mode.
3. Perform performance testing configuration in the testing scenarios. For configuration details, see Stress Configuration .
4. Click Environment Management to manage specific environments, then use the env function in the script.


import {env} from 'pts'

let a = env()
console.log(a.name)
console.log(a.age)

Simple Mode

1. Log in to the TCOP console, select PTS > Test Scenarios in the left navigation bar, and click Create Scenario.
2. Select Simple Mode.
3. Perform performance testing configuration in the testing scenarios. For configuration details, see Stress Configuration .
4. Click Environment Management to manage specific environments. In Simple Mode, variable references will be automatically generated and can be used directly.




도움말 및 지원

문제 해결에 도움이 되었나요?

피드백