your_handler.py
, you can test it like this:
test_input.json
file.
This approach allows you to easily manage and version control your test cases.
Create a file named test_input.json
in the same directory as your your_handler.py
file. For example:
test_input.json
file if it exists.
test_input.json
is particularly helpful when:
--test_input
argument), it will override the test_input.json
file. This allows for flexibility in your testing process.--rp_serve_api
flag:
http://localhost:8000
.
--rp_api_port
: Specify a custom port (default is 8000)--rp_api_host
: Set the host address (default is “localhost”)--rp_api_concurrency
: Set the number of worker processes (default is 1)8080
with 4 worker processes.
curl
or Postman, or write scripts to automate your tests.
Example using curl
:
--rp_log_level
: Control log verbosity (options: ERROR, WARN, INFO, DEBUG)--rp_debugger
: Enable the Runpod debugger for detailed troubleshooting