Functions local testing
Local testing allows you to run your code on your development environment with a short deploy time.
Available frameworks:
Content hosted on external websites is not maintained by the Scaleway Product Documentation team.
Our real-world examples use local testing, check our repository here: scaleway/serverless-examples repository.
Local testing
Scaleway Serverless Functions can run outside Scaleway infrastructures. This is useful to set up, develop, and test functions locally. You can run functions directly on your machines to debug them and analyze logs.
Each local testing framework is written in its respective language and emulates the calls made to functions by the Scaleway infrastructure. The result is a language-specific executable or script, that users can connect to with their favorite debug and local tools.
Requirements
Local testing your function will create a local web server that listens to a given port.
You will need to be able to install packages with the dependency manager of the runtime you use
(ex: pip
, go get
…).
Limitations
Each local testing library does its best to replicate the Serverless Functions environment, but cannot fully emulate the surrounding infrastructure. Therefore, although being able to run your function locally is a good indicator that it will work, it may still fail due to the execution environment used in Scaleway Serverless Functions.
The most significant difference is that when running in Scaleway Serverless Functions, we have packaged your function into a custom Docker image, built in our build pipeline. This means that at runtime, your function may be launched in a different operating system, with different libraries available to your local development environment.
Performance during local testing can differ from the deployed Serverless Functions environment, and will involve limitations around resource usage and quotas. and CPU/Memory settings does not apply to local testing functions.