- Documentation
Volcano Engine Function as a Service
User guide
Functions
Testing functions
Functions
Testing functions
Testing functions
After a function is released, you can initiate a function test in the console. veFaaS will simulate a specified trigger to send a request to your online function and display the test results to verify whether the behavior of the function meets your expectations.
Background information
veFaaS supports both synchronous invocation and asynchronous tasks. If the asynchronous task feature is not enabled, the synchronous invocation method is used by default.
Prerequisites
Limits
- You can perform an online test only on released function revisions. To test the updated function code, you need to release the updated code first.
- The trigger test request must be in JSON format.
- When a canary version exists, test requests are randomly routed to the new and old function versions based on the traffic percentage.
- For synchronous invocation, online testing cannot be performed on functions whose execution time exceeds 30 seconds. The system will return an execution timeout error.
tip
veFaaS supports both synchronous invocation and asynchronous tasks. For functions for which the asynchronous task feature is not enabled, the synchronous invocation method is used by default.
- In test requests for APIG triggers, the method must be in all uppercase letters.
Procedure
- In the top navigation bar, select the target region.
- In the function list, find the function to be tested and click its name.
- On the function details page, click Test in the upper-right corner.
- In the Function test panel, select the type of trigger for testing.
- (Optional) Modify the default test request as needed. The request after modification must be in the JSON format.
tip
- Reset: Reset the test request to the default test request.
- Format: Format and arrange multiple JSON data entries in the same line.
- Click Test to execute the function test.
Operation result
- For a function with asynchronous task disabled, synchronous invocation is used by default. The console displays an execution summary, including CPU consumption during the request, function memory consumption, and function execution duration, and the response result of the function.
- For a function with asynchronous tasks enabled, the console will return the RequestID. Click View details to view the execution status of the current task in the asynchronous task list.
- The console will display execution logs to help you troubleshoot.
Last updated: 2026.08.19 14:06:05