# 自测工具

为了方便游戏开发者测试游戏与平台的对接，平台提供游戏测试工具App（[点我下载](/project/you-xi-jie-ru-wen-dang/zi-ce-gong-ju.md)）。测试工具可以拉起游戏并提供游戏登录、支付、对战匹配功能。

#### 开发者必须使用自测工具测试接入没有问题后才可打包提交平台审核。

测试工具可以通过两个方式拉起游戏：

1. 通过URL拉起游戏
2. 通过本地游戏包拉起游戏

测试工具通过读取配置游戏参数，确定拉起的游戏类型，以及游戏拉起方式。

配置游戏参数流程：启动自测工具点击左上角配置游戏按钮，进入游戏配置页面。根据需求配置并保存。

配置文件格式：

```
{
   gameId: 100001, 
   gameType: 对战类游戏/非对战类游戏,
   gameMode: h5/runtime/h5外链,
   loadType: file/url, 
   path: /jeekegame/game.cpk 
}
```

配置文件说明：

| **参数**       | **含义** | **类型** | **备注**                                                                                                                                                                                                                                                                                                                                                                         |
| ------------ | ------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| gameId       | 游戏ID   | 整数     | 通过CP后台获取                                                                                                                                                                                                                                                                                                                                                                       |
| loadType     | 游戏加载类型 | 字符串    | ”file” 或 ”url”                                                                                                                                                                                                                                                                                                                                                                 |
| gameMode     | 游戏加载形式 | 字符串    | runtime、H5游戏链接、H5游戏                                                                                                                                                                                                                                                                                                                                                            |
| gameType     | 游戏类型   | 字符串    | 对战游戏、非对战游戏                                                                                                                                                                                                                                                                                                                                                                     |
| loadLocation | 游戏加载地址 | 字符串    | <p>根据加载类型,1、以文件方式从指定位置加载游戏包（加载类型为：”file”），2、以网页方式从指定网址打开游戏（加载类型为：”url”）。<br> url例：<a href="http://chukong.oss-cn-qingdao.aliyuncs.com/uploads/201903/cpk/46b790b0da91f7fb45853e897590fefb.cpk?1552472595296"><http://chukong.oss-cn-qingdao.aliyuncs.com/uploads/201903/cpk/46b790b0da91f7fb45853e897590fefb.cpk?1552472595296></a></p><p>File例：</p><p>/cocosgame/game.cpk</p> |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gamebox.gitbook.io/project/you-xi-jie-ru-wen-dang/ji-shu-dui-jie/zi-ce-gong-ju.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
