หน้านี้ยังไม่พร้อมใช้งานในภาษาท้องถิ่นของคุณ เรากำลังพยายามอย่างหนักเพื่อเพิ่มเวอร์ชันภาษาอื่น ๆ เพิ่มเติม ขอบคุณสำหรับการสนับสนุนเสมอมา

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ CodeArts PerfTest/ User Guide/ PerfTest Case Management/ Configuring a Test Case (High-Performance Test Projects)/ Adding a Data Instruction, Cycle Controller, Condition Judgment, or Rendezvous Point

Adding a Data Instruction, Cycle Controller, Condition Judgment, or Rendezvous Point

Updated on 2025-01-07 GMT+08:00

Data Instruction

  1. Log in to the CodeArts PerfTest console and choose PerfTest Projects in the left navigation pane.
  2. Click the name of the desired PerfTest project to go to the details page.
  3. On the Cases tab, select the desired test case in the case list on the left.
  4. On the Case Script tab, choose Add More > Data Set.
  5. Click Add Param, and configure Name, Logic, and Mode.

    • Name

      Name of the parameter to which the parameter logic result will be assigned as the parameter value.

    • Logic
      1. To assign a constant value to a parameter, enter a character string, for example, 1.23 or abc.
      2. To assign a variable value to a parameter, enter $ in the text box. In the displayed Insert Variable dialog box, select a variable type.

        If you set Type to Custom, set the following parameters:

        1. Range: variable range.
        2. Name: name of a custom variable. Specifies the name of a variable when the variable is added.
        If you set Type to System, select a function. For details, see Table 1.
        Table 1 Functions

        Name

        Description

        ID card number

        Randomly generates an ID number.

        Mobile phone number

        Randomly generates a phone number.

        Random number in a range

        Randomly generates an integer within your specified range.

        Random character string

        Randomly generates a string consisting of lowercase letters and numbers based on your specified string length (1 to 32 characters).

        Time stamp

        Generates a timestamp for the current time based on your specified unit. A 10-digit timestamp represents time in seconds whereas a 13-digit timestamp represents time in milliseconds.

        Datetime Format

        Outputs the current time in the specified format. Time offsets in seconds are supported.

        UUID

        Randomly generates a string of 32 characters.

        If you set Type to Four Fundamental rules, select a function.
        1. Select +, -, x, /, or Scale Mode from the drop-down list box, and click Select.
        2. Click . In the displayed Four Functions Editing dialog box, set the following parameters:
          • Expression: Enter operands for the arithmetic operation. An operand can be a number (such as 1.23), a global, local, or system variable. You can reselect the operation here.
          • Mode: Select how the expression result will be rounded. For details, see Table 2.
            Table 2 Rounding modes

            Name

            Description (Using Two Decimal Place Rounding as an Example)

            Far-zero Rounding

            Rounds the number in a way that the result heads away from zero. For example, 1.234 is rounded to 1.24, and –1.234 is rounded to –1.24.

            Near-zero Rounding

            Rounds the number in a way that the result heads towards zero. For example, 1.234 is rounded to 1.23, and –1.234 is rounded to –1.23.

            Round Up

            Rounds the number towards positive infinity. Positive numbers will be rounded up, whereas the unwanted digits of negative numbers will be simply discarded. For example, 1.234 is rounded to 1.24, and –1.234 is rounded to –1.23.

            Round Down

            Rounds the number towards negative infinity. The unwanted digits of positive numbers will be simply discarded whereas negative numbers will be rounded down. For example, 1.234 is rounded to 1.23, and –1.234 is rounded to –1.24.

            Rounding

            If the first digit to be discarded is smaller than 5, the digit and all the digits that follow are simply discarded. Otherwise, the last retained digit is increased by 1 in value. For example, 1.234 is rounded to 1.23 and –1.235 is rounded to –1.24.

            Rounded to six

            If the first digit to be discarded is smaller than 6, the digit and all the digits that follow are simply discarded. Otherwise, the last retained digit is increased by 1 in value. For example, 1.235 is rounded to 1.23 and –1.236 is rounded to –1.24.

            Bankers

            Rounds the number to its nearest even integer. For example. 1.2350000 is rounded to 1.24, 1.2250000 is rounded to 1.22, and 1.2250001 is rounded to 1.23.

            No Rounding

            The number is not rounded.

            If this mode is selected, no further action is required.

          • Precision: The maximum number of decimal places is 32.
        3. When the configuration is complete, click OK. If you specify multiple logics for a parameter, all the logics are combined as a character string and the string is assigned to the parameter as its value.
        When the variable type is the encryption function, you need to select the encryption type and the position where the variable is inserted. The encryption types are as follows:
        • MD5: Encrypts the val data using MD5 and returns the encrypted data string.
        • MD5-BASE64: Performs MD5-BASE64 encoding on val data and returns the encoded data string.
        • SHA-1: Encrypts the input data using SHA-1 and returns the encrypted data string.
        • SHA-224: Encrypts the input data using SHA-224 and returns the encrypted data character string.
        • SHA-256: Encrypts the input data using SHA-256 and returns the encrypted data character string.
        • SHA-384: Encrypts the input data using SHA-384 and returns the encrypted data string.
        • SHA-512: Encrypts the input data using SHA-512 and returns the encrypted data character string.
        • BASE64 encoding: Encodes the input data using BASE64 and returns the encoded data string.
        • BASE64 decoding: Performs BASE64 decoding on the input data and returns the decoded data character string.
    • Mode
      • If you select Repeated assignment from the drop-down list box, a value is assigned each time the parameter value is needed in a thread.
      • If you select Assigned once from the drop-down list, the parameter value is assigned only once in a thread.

  6. When the configuration is complete, click Save.

Cycle Controller

  1. Log in to the CodeArts PerfTest console and choose PerfTest Projects in the left navigation pane.
  2. Click the name of the desired PerfTest project to go to the details page.
  3. On the Cases tab, select the desired case in the case list on the left.
  4. On the Case Script tab, choose Add More > Cycle Controller.
  5. Set parameters.

    Number of Cycles: Enter a value between 1 and 1,000,000.

    Exit Conditions: If the request meets the condition, the cycle ends. Both expressions and comparisons support variables and character strings. Currently, conditions cannot be combined. If you need to use a set or multiple comparisons, set a regular expression.

  6. Click Add More to specify more details for the cycle. A maximum of 10 layers of steps can be nested.
  7. When the configuration is complete, click Save.

Condition Judgment

  1. Log in to the CodeArts PerfTest console and choose PerfTest Projects in the left navigation pane.
  2. Click the name of the desired PerfTest project to go to the details page.
  3. On the Cases tab, select the desired case in the case list on the left.
  4. On the Case Script tab, choose Add More > Condition Controller.
  5. Set parameters.

    Judgment Condition: If a request meets the condition, the request, transaction, or other logic controller defined by the condition controller is executed. Both expressions and comparisons support variables and character strings. Currently, conditions cannot be combined. If you need to use a set or multiple comparisons, set a regular expression.

  6. Click Add More to add requests, transactions, or other logic controllers that are executed after conditions are met. A maximum of 10 layers of steps can be nested.
  7. When the configuration is complete, click Save.

Rendezvous Point

The purpose of a rendezvous point is to block concurrency until either X concurrent requests are blocked or the waiting time is reached, at which point all of them are released at a time. Therefore, a rendezvous point can create large instant loads at different points of the test case.

  1. Log in to the CodeArts PerfTest console and choose PerfTest Projects in the left navigation pane.
  2. Click the name of the desired PerfTest project to go to the details page.
  3. On the Cases tab, select the desired case in the case list on the left.
  4. On the Case Script tab, choose Add More > Rendezvous Point.
  5. Set parameters.

    Waiting Time (ms): waiting time at the rendezvous point.

    Concurrent Number: When the number of users reaches this quantity, the users waiting at the rendezvous are released.

  6. When the configuration is complete, click Save.

เราใช้คุกกี้เพื่อปรับปรุงไซต์และประสบการณ์การใช้ของคุณ การเรียกดูเว็บไซต์ของเราต่อแสดงว่าคุณยอมรับนโยบายคุกกี้ของเรา เรียนรู้เพิ่มเติม

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback