boltctl serverless test
Test your serverless functions locally or after deploying it to the platform.
Usage
boltctl serverless test [flags]
Flags
-d, --base-dir stringThe base directory that contains the source code
-c, --config stringPath to application configuration file
-f, --handler-file stringThe handler file to run
-u, --handler-function stringName of the handler function to call
-l, --language stringLanguage the function is written in, ex: nodejs/20, python/3, golang/1.22, etc
--localTest the function only locally without deploying it to the remote. This is the default. Use --remote to test remotely. (default true)
-p, --port intThe port to run the runtime interface on (default 8080)
--remotePerform tests after deploying the app/function to the remote instead of running it locally. The default is --local.
-r, --retainRetain all the files auto-generated during the test
Examples
To test a serverless function on your local machine:
boltctl serverless test
WARN no language specified, auto-detecting
Scanning source code
Detected a nodejs app
INFO starting local test server on http://localhost:8080
INFO Listening for events on port 8080 in development mode
You can now test this function by sending events to the endpoints on http://localhost:8080
![]() |
|---|
To test a serverless function remotely:
- Currently this cannot be done from a local machine. Please deploy the app/function first to test it remotely. Refer Launch your application
