NavigationContentFooter
Jump toSuggest an edit

Functions local testing

Reviewed on 03 October 2024Published on 06 March 2023

Local testing allows you to run your code on your development environment with a short deploy time.

Available frameworks:

  • NodeJS
  • Python
  • Go
Tip

Our real-world examples use local testing. Check our serverless-examples repository for more information.

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 debugging and logging tools.

Requirements

Testing your function locally will create a local web server that listens to a given port.

You need to be able to install packages with the dependency manager of the runtime you use, such as pip, go get, etc.

Limitations

Each local testing library tries to best 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, your function is packaged into a custom Docker image using 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.

Note

CPU/memory settings do not apply when testing functions locally.

API DocsScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCareers
© 2023-2024 – Scaleway