> For the complete documentation index, see [llms.txt](https://docs.gpmautomate.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gpmautomate.com/automate-zh/gai-shu/test-action-guide.md).

# 测试操作指南

测试 (Test) 是一个重要的步骤，帮助您控制脚本的执行流程，允许逐步或逐块执行，以确保一切按预期运行，然后再进行实际运行。

### 🎯 为什么需要测试操作？

* 控制错误：在执行操作时立即发现和处理问题，而不是从头开始运行整个脚本。
* 灵活调整：您可以隔离单个操作或一个代码块 (Block) 进行测试，从而缩短调试时间。
* 进度到哪里，测试到哪里：GPM Automate 支持在 GPM 登录的配置文件上直接进行测试，帮助您立即在浏览器中观察结果。

> 注意：当前测试功能仅支持 GPM 登录中的配置文件。

### ⚙️ 测试执行流程

要开始测试过程，请按照以下步骤操作：

#### 1️⃣ 步骤 1：在 GPM 登录中配置配置文件

* 打开 GPM 登录。
* 找到您想用来测试的配置文件。
* 点击配置文件名称旁边的三个点。
* 选择“使用远程端口运行”以获取控制端口的参数。

#### 2️⃣ 步骤 2：在 GPM Automate 中设置

* 在 GPM Automate 界面中，选择您想要进行测试的命令 (Action) 或代码块 (Block)。
* 在上方工具栏中，点击“测试”按钮。
* 将出现一个测试配置对话框。
* 将步骤 1 中从 GPM 登录获取的端口输入到相应的框中。
* 点击“开始”以开始。

#### 3️⃣ 步骤 3：观察结果

* 点击“开始”后，系统将在所选配置文件上执行命令。
* 您可以在浏览器窗口和 GPM Automate 的日志 (Log) 中查看结果，以便在必要时调整脚本。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.gpmautomate.com/automate-zh/gai-shu/test-action-guide.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
