Esta página aún no está disponible en su idioma local. Estamos trabajando arduamente para agregar más versiones de idiomas. Gracias por tu apoyo.
- Service Overview
- Getting Started
-
User Guide
- Service Entries
- Testing Plan
- Testing Design
- Testing Management
-
Testing Case
- Introduction
- Test Case Library
- Manual Test Cases
-
API Automation Test Cases
- Creating an API Automation Test Case
- Writing an API Automation Script
- Keyword Library
- API Keywords
- Combined Keywords
- Importing cURL to Generate Test Scripts
- Setting an API Request
- Setting a Test Checkpoint
- Setting Response Extraction
- Importing a Postman File
- Inserting Logic Control
- Setting Test Case Parameters
- Setting Environment Parameters
- Importing an API Automation Case
- Executing an API Automation Test Case
- Custom Automation Test Cases
-
Advanced Configurations of API Automation
-
Built-in Functions
- Binary Addition Operation
- Binary Subtraction Operation
- Binary Multiplication Operation
- Binary Division Operation
- Obtaining the Current Timestamp
- Obtaining a Specified Timestamp
- Converting a Date into a Timestamp
- Converting a Timestamp into a Date
- Timestamp Addition and Subtraction Operations
- Generating Base64 Encoding
- Generating SHA512 Encoding
- Generating an MD5 Hash Value
- Generating a Random Number in a Specified Range
- Generating a Random String of a Specified Length
- Generating a UUID
- Obtaining an Array via Reverse Index
- Obtaining the Element Values of an Array via Reverse Index
- Converting Uppercase Letters into Lowercase Letters
- Converting Lowercase Letters into Uppercase Letters
- Concatenating Strings
- Cutting Strings
- Advanced Extraction Types
-
Built-in Functions
- Adding Test Cases in Batches
- Managing Test Cases in the Features Directory
- Test Cases and Requirements
- Test Cases and Defects
- Commenting on Test Cases
- Filtering Test Cases
- Customizing Columns to Be Displayed in the Test Case List
- Testing Execution
- Quality Report and Assessment
- Settings
- Roles and Operation Permissions
-
FAQs
- What Do I Do If No Test Case Exists in a Test Suite?
- What Can I Do If I Do Not Have the Operation Permission?
- Why Am I See a Message Indicating that an API Automation Test Suite Is Being Executed or Queuing?
- What Do I Do If a Test Suite ID Does Not Exist?
- Why Can't I Download the Document in a Manual Test Case?
- What Do I Do If No Test Case Exists In a Test Plan
- Why Can't I Add Work Items of the Task Type When a Test Plan Is Created or Updated?
- What Do I Do If Test Cases Cannot Be Associated with Work Items of the Task Type?
- What Do I Do If the Test Case Completion Rate in the Test Report Is Lower Than 100%?
- Why Is the Status of Test Cases in a Test Plan Inconsistent with That in a Test Case Library?
- How Are Variables Passed Between Steps in API Automation Cases?
- How Do I Set Checkpoints for Test Procedures in API Automation Cases?
- Best Practices
Generating Base64 Encoding
Function Name
$encode_base64(StringA)
Parameter Description
StringA: string to be encoded. The value contains a maximum of 256 bytes and supports the following special characters: !*'();:@&=+$,/?#[]-.~%<>_|{}`^.
Function Description
Performs Base64 encoding on strings. Parameter A supports the following types:
- Value in the format listed in Parameter Description
- Environment parameters
- Local parameters
- Other built-in functions
Application Scenarios
The Base64 encoding generation function can be used in the following scenarios for API automation:
- Request URL
- Request header
- Request body
- Checkpoint property
- if condition
- for loop interrupt condition
Example
- Request URL
As shown in the following figure, the value of test in the request URL is the Base64 encoding generation function. Parameter A in the function is the string abc123.
- Request header
As shown in the following figure, the value of Accept-Encoding in the request header is the Base64 encoding generation function. Parameter A in the function is the string abc123.
- Request body
As shown in the following figure, the request body uses the Base64 encoding generation function. Parameter A in the function is $uuid().
- Checkpoint property
As shown in the following figure, the target value of the checkpoint property result is the Base64 encoding generation function. Parameter A in the function is the local parameter test. For details about how to set local parameters, see Local Parameters.
- if condition
As shown in the following figure, the target value of the if condition is the Base64 encoding generation function. Parameter A in the function is the environment variable status. For details about how to set environment parameters, see Setting Environment Parameters.
- for loop interrupt condition
As shown in the following figure, the target value of the for loop interrupt condition is the Base64 encoding generation function. Parameter A in the function is the string abc123.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.