> 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/gioi-thieu-chung/huong-dan-test-action-kiem-thu.md).

# 🛠️ Hướng dẫn Test action (Kiểm thử)

Việc kiểm thử (Test) là bước quan trọng giúp bạn kiểm soát luồng chạy của kịch bản, cho phép chạy thử từng bước hoặc từng khối lệnh để đảm bảo mọi thứ vận hành đúng ý đồ trước khi chạy thực tế.

🎥 Xem thêm video hướng dẫn: [Tại đây](https://youtu.be/zrX3ldxvEDE).

### 🎯 Tại sao cần Test action?

* Kiểm soát lỗi: Phát hiện và xử lý vấn đề ngay khi thực hiện hành động, thay vì phải chạy toàn bộ kịch bản từ đầu.
* Tinh chỉnh linh hoạt: Bạn có thể cô lập một hành động đơn lẻ hoặc một khối lệnh (Block) để kiểm tra, giúp rút ngắn thời gian debug.
* Quy trình làm tới đâu, test tới đó: GPM Automate hỗ trợ cơ chế kiểm thử trực tiếp trên các profile của GPM Login, giúp bạn quan sát kết quả ngay lập tức trên trình duyệt.

> Lưu ý: Tính năng Test hiện tại chỉ hỗ trợ các profile trong GPM Login.

### ⚙️ Quy trình thực hiện Test

Để bắt đầu quá trình kiểm thử, bạn thực hiện theo các bước sau:

#### 1️⃣ Bước 1: Cấu hình profile trong GPM Login

* Mở GPM Login.
* Tìm đến profile bạn muốn dùng để test.
* Nhấn vào dấu 3 chấm ở cạnh tên profile.
* Chọn Chạy với remote port để lấy thông số cổng điều khiển.

<figure><img src="/files/HiWnlRbj3sMT0bocvHjV" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/3kh1OE8d42oIKxKmMR9q" alt=""><figcaption></figcaption></figure>

#### 2️⃣ Bước 2: Thiết lập trong GPM Automate

* Tại giao diện GPM Automate, chọn lệnh (Action) hoặc khối lệnh (Block) mà bạn muốn thực hiện kiểm thử.
* Trên thanh công cụ phía trên, nhấn vào nút Test.
* Một hộp thoại cấu hình Test sẽ hiện ra.
* Nhập Port (cổng) đã lấy được từ GPM Login ở Bước 1 vào ô tương ứng.
* Nhấn Start để bắt đầu.

<figure><img src="/files/45YpLin5ISF21IPRQyMz" alt=""><figcaption></figcaption></figure>

#### 3️⃣ Bước 3: Quan sát kết quả

* Sau khi nhấn Start, hệ thống sẽ thực thi lệnh trên profile đã chọn.
* Bạn theo dõi kết quả hiển thị ngay tại cửa sổ trình duyệt và nhật ký (Log) của GPM Automate để điều chỉnh kịch bản nếu cần thiết.


---

# 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/gioi-thieu-chung/huong-dan-test-action-kiem-thu.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.
