Esta página ainda não está disponível no idioma selecionado. Estamos trabalhando para adicionar mais opções de idiomas. Agradecemos sua compreensão.

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
Situation Awareness
Managed Threat Detection
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

Online Debugging

Updated on 2024-08-07 GMT+08:00

Precautions

Event data is passed to the handler of your function as an input. After configuration, event data is persisted for later use. Each function can have a maximum of 10 test events.

Creating a Test Event

  1. Log in to the FunctionGraph console, and choose Functions > Function List in the navigation pane.
  2. Click the name of the desired function.
  3. On the function details page, select a version, and click Test.
  4. In the Configure Test Event dialog box, configure the test event information according to Table 1. The parameter marked with an asterisk (*) is mandatory.

    Table 1 Test event information

    Parameter

    Description

    Configure Test Event

    You can choose to create a test event or edit an existing one.

    Use the default option Create new test event.

    Event Template

    If you select blank-template, you can create a test event from scratch.

    If you select a template, the corresponding test event in the template is automatically loaded. For details about event templates, see Table 2.

    *Event Name

    The event name can contain 1 to 25 characters and must start with a letter and end with a letter or digit. Only letters, digits, underscores (_), and hyphens (-) are allowed. For example, even-123test.

    Event data

    Enter a test event.

    Table 2 Event template description

    Template Name

    Description

    API Gateway (APIG)

    Simulates an APIG event to trigger your function.

    API Gateway (Dedicated Gateway)

    Simulates a dedicated APIG event to trigger your function.

    Cloud Trace Service (CTS)

    Simulates a CTS event to trigger your function.

    Document Database Service (DDS)

    Simulates a DDS event to trigger your function.

    GaussDB(for Mongo)

    Simulates a GaussDB(for Mongo) event to trigger your function.

    Data Ingestion Service (DIS)

    Simulates a DIS event to trigger your function.

    Log Tank Service (LTS)

    Simulates an LTS event to trigger your function.

    Object Storage Service (OBS)

    Simulates an OBS event to trigger your function.

    Simple Message Notification (SMN)

    Simulates an SMN event to trigger your function.

    Timer

    Simulates a timer event to trigger your function.

    DMS (for Kafka)

    Simulates a Kafka event to trigger your function.

    Kafka (OPENSOURCEKAFKA)

    Simulates an open-source Kafka event to trigger your function.

    DMS (for RabbitMQ)

    Simulates a RabbitMQ event to trigger your function.

    Blank Template

    The event is {"key": "value"}, which can be changed based on requirements.

    Login Security Analysis

    Serves as an input for the loginSecurity-realtime-analysis-python function template.

    Image Classification

    Serves as an input for the image-tag function template.

    Pornographic Image Analysis

    Serves as an input for the porn-image-analysis function template.

    Speech Recognition

    Serves as an input for the voice-analysis function template.

  5. Click Create.

Testing a Function

After creating a function, you can test it online to check whether it can run properly as expected.

  1. Return to the FunctionGraph console. In the navigation pane, choose Functions > Function List.
  2. Click the name of the desired function.
  3. On the displayed function details page, select a version and test event, and click Test.

    Figure 1 Selecting a test event

  4. Click Test. The function test result is displayed.

    NOTE:

    The Log Output area displays a maximum of 2 KB logs. To view more logs, see Managing Function Logs.

Modifying a Test Event

  1. Return to the FunctionGraph console. In the navigation pane, choose Functions > Function List.
  2. Click the name of the desired function.
  3. On the displayed function details page, select a version and click Configure Test Event. The Configure Test Event dialog box is displayed.
  4. In the Configure Test Event dialog box, modify the test event information according to Table 3.

    Table 3 Test event information

    Parameter

    Description

    Create new test event

    Create a test event.

    Edit saved test event

    Modify an existing test event.

    Event data

    Modify the test event code.

  5. Click Save.

Deleting a Test Event

  1. Return to the FunctionGraph console. In the navigation pane, choose Functions > Function List.
  2. Click the name of the desired function.
  3. On the function details page that is displayed, select a version, as shown in Figure 2.

    Figure 2 Selecting a FunctionGraph version

  4. On the Code tab page, click Configure Test Event. The editing page is displayed, as shown in Figure 3.

    Figure 3 Selecting Configure Test Event

  5. On the Configure Test Event page, select Edit saved test event. In the Saved Test Events list on the left, select the event to be deleted and click Delete.

    Figure 4 Deleting a test event
    Table 4 Configuring test event information

    Parameter

    Description

    Create new test event

    Select a test event template.

    Edit saved test event

    Select the test event you want to delete.

Usamos cookies para aprimorar nosso site e sua experiência. Ao continuar a navegar em nosso site, você aceita nossa política de cookies. Saiba mais

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback