> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Test Backend Functions with Functional Testing

## Article: Functional Testing in the Backend

## Article Link: https://dev.wix.com/docs/develop-websites/articles/workspace-tools/testing-monitoring/functional-testing/test-backend-functions-with-functional-testing.md

## Article Content:

# Test Backend Functions with Functional Testing

The code editor comes with a functional testing tab where you can test your backend functions individually. This reduces the need to manually trigger and test your backend code by [calling functions from the frontend](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/backend-code/web-modules/call-backend-code-from-the-frontend.md), speeding up the development and debugging process.


## Test a backend function

To test a single backend function with functional testing:

1. In the code panel, open the backend file that contains the function you want to test. 
1. In the code editor, click the **play icon** button ![play icon](https://wixmp-833713b177cebf373f611808.wixmp.com/images/1ac7cb9c0770f069c5fb697f77f69cfe.png) located to the left of your function. 
    <div style="text-align:center">
    
    <img src="https://wixmp-833713b177cebf373f611808.wixmp.com/images/53d57da92c784e285c3c99f851d8582c.png" style="max-width:60vw"/>
    
    </div>

    This opens the functional testing tab. Your function name appears in the tab header.
<!-- ADD LINK -->
1.  In the Set Parameters section of the test tab, each parameter appears as a separate property in a JSON. Add [sample arguments](#LINK-TO-ADVANCED-FUNCTIONAL-TESTING-ARTICLE) for each property in the JSON. 
    <div style="text-align:center">
    
    <img src="https://wixmp-833713b177cebf373f611808.wixmp.com/images/66128b0b6607d441a584f1968d857485.png" style="max-width:60vw"/>
    
    </div>

    >**Note** 
    > If your function doesn't take any parameters, leave the JSON empty. 

1. Click **Run** in the Set Parameters section. <br>
    The output appears on the right. 
    <div style="text-align:center">
    
    <img src="https://wixmp-833713b177cebf373f611808.wixmp.com/images/0c78e418ca71cb5c0e957e6a19e063af.png" style="max-width:60vw"/>
    
    </div>

    >**Note:**
    > If you close the functional testing tab, the last sample input parameter values and the most recent function output are saved and appear when you reopen the tab unless you refresh the page. 

## Additional functional testing tab actions

You can also perform the following actions in the functional testing tab:

- **Clear sample parameter values:** 
  Hover over your parameter values in the **Set Parameters** section and click the reset button ![](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/0ca9e8ba-16ed-4cd8-a1e1-58d01c4420f7/2020/12/19/14d12f7e-38c4-42e8-92e4-f1f81c2b0e41/8b857a02-2741-4363-af44-d3092e547395.png).

- **Clear test output:**
  Hover over your output in the View Function Output section and click the clear button: ![](https://d2x3xhvgiqkx42.cloudfront.net/12345678-1234-1234-1234-1234567890ab/0ca9e8ba-16ed-4cd8-a1e1-58d01c4420f7/2020/12/19/5f1daab5-e507-4211-b1aa-c7364dbe00c8/8b3e2ccd-a0b9-4bce-8a94-cd4257dad2e9.png).

## See also
- [About Functional Testing](https://dev.wix.com/docs/develop-websites/articles/workspace-tools/testing-monitoring/functional-testing/about-functional-testing.md)
- [Functional Testing Examples](https://dev.wix.com/docs/develop-websites/articles/workspace-tools/testing-monitoring/functional-testing/functional-testing-examples.md)