---
metadata:
  - name: generator
    content: Diplodoc Platform v5.66.0
alternate:
  - https://yandex.com/dev/games/doc/en/sdk/cocos/testing.md
  - https://yandex.com/dev/games/doc/hi/sdk/cocos/testing.md
  - https://yandex.com/dev/games/doc/ko/sdk/cocos/testing.md
  - https://yandex.com/dev/games/doc/ru/sdk/cocos/testing.md
  - https://yandex.com/dev/games/doc/tr/sdk/cocos/testing.md
  - https://yandex.com/dev/games/doc/vi/sdk/cocos/testing.md
  - https://yandex.com/dev/games/doc/zh/sdk/cocos/testing.md
  - href: https://yandex.com/dev/games/doc/en/sdk/cocos/testing.md
    type: text/markdown
    title: Markdown version
  - href: https://yandex.com/dev/games/doc/en/llms.txt?revision=r21993288
    rel: describedby
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com/dev/games/doc/en/llms.txt?revision=r21993288

# Testing

<!-- source: en/_includes/script-common.md -->
<!-- source: en/_includes/script/index-js.md -->

<!-- endsource: en/_includes/script/index-js.md -->

<!-- source: en/_includes/script/requirements-js.md -->

<!-- endsource: en/_includes/script/requirements-js.md -->

<!-- source: en/_includes/script/image-modal-js.md -->

<!-- endsource: en/_includes/script/image-modal-js.md -->
<!-- endsource: en/_includes/script-common.md -->

Games can be launched on the platform from a local server, simplifying the development and testing of functionality related to the SDK.

Please note that you will need to [add a draft of the game](https://yandex.com/dev/games/doc/en/console/add-new-game.md) using the Yandex Games console.

## Build Configuration {#build-configuration}

First, configure the project build in the **Project** → **Build** panel.

![Cocos Creator screenshot. In the top-left corner, there is a menu with several sections: "File", "Edit", "Node", "Project", "Panel", "Extension", "Developer", "Help", "Yandex.Games SDK", and others. The "Project" section is selected, and in the drop-down menu, the pointer is hovered over the "Build" option.](../../_images/cocos/testing/build.webp)

In the window that opens, click **New Build Task** to create a new build configuration.

Configure the parameters. It is usually recommended to enable the **Source Maps** and **Debug** options to simplify debugging.

![Cocos Creator screenshot, the "Build" window, and the "Edit Build Config" pop-up window.](../../_images/cocos/testing/edit-build-config.webp)

After finishing the configuration, click the **Build** button to build the project.

Then, go to the folder where the project is located. You will see a folder with a structure similar to this:

```text showLineNumbers
Project name/
└── build/
    └── debug/
        ├── ...
        └── index.html
```

## Setting Up a Local Server {#local-server-setting}

For detailed information, see the section [Launch from local server](https://yandex.com/dev/games/doc/en/concepts/local-launch.md).

### Testing {#testing}

When the local server is running, you can test the game using this link, where XXXXXX is the code of your draft:

```text
https://yandex.ru/games/app/XXXXXX?draft=true&game_url=https://localhost:6577
```

To test a new version, rebuild the project in the **Build** panel without changing any parameters, and refresh the page after the build is complete.

![Screenshot of the "debug" pop-up window with the green text "5-8-2023 23:01:44 Build success in 19220 ms!" In the bottom-right corner, there are "Build" and "Run" buttons, with the pointer hovered over the "Build" button.](../../_images/cocos/testing/rebuild.webp)

---


<!-- source: en/_includes/sdk/button-git.md -->
<a href="https://github.com/yandex-games-plugins/cocos">
  <span class="button">Repository</span>
</a>
<!-- endsource: en/_includes/sdk/button-git.md -->
