---
title: How to test a function
description: Instructions for testing your Serverless Functions on Scaleway.
tags: function serverless test-function
dates:
  validation: 2025-10-23
  posted: 2023-09-25
---
import Requirements from '@macros/iam/requirements.mdx'


This page shows you how to execute Serverless Functions from the [Scaleway console](https://console.scaleway.com). The **Test** feature of a function allows you to run your code using a selection of methods to make sure it behaves as expected.

<Requirements />

- A Scaleway account logged into the [console](https://console.scaleway.com)
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
- [Created a function](/serverless-functions/how-to/create-a-function/)

1. Click **Functions** in the **Serverless** section of the side menu. The functions page displays.

2. Click the relevant functions namespace. A list of your functions displays.

3. Click the name of the function you want to test.

4. Open the **Test** tab.

5. Select the **method** you want to use from the drop-down menu.

6. Enter the **path** to your function. Leave the default `/` value if your function is not located in a specific folder within a [Zip package](/serverless-functions/how-to/package-function-dependencies-in-zip/).

7. Click **+ Advanced options** to add any required HTTP header or parameter to your function.

8. Copy the generated command, then execute it in a terminal.

    <Message type="note">
    Testing a private function requires you use an [authentication token](/serverless-functions/how-to/create-auth-token-from-console/) as a header, as shown below:

    ```bash
    export TOKEN=<YOUR_AUTH_TOKEN>
    curl -H "X-Auth-Token: $TOKEN" <YOUR_FUNCTION_ENDPOINT>
    ```
    </Message>

The output of your terminal displays the response from your function, and the status code.

<Message type="note">
If you encounter a message error while testing your function, refer to the [dedicated troubleshooting](/serverless-functions/troubleshooting/tests-fail-on-function/) for more information.
</Message>