diff --git a/README.md b/README.md index a0d130e..d6e05e5 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Gobot is a powerful stateful API testing robot. It provides a graphical interfac 1. Download the specified version of the editor and driver on the release page. 2. Execute the driver end in memory mode on the command line `./gobot-driver-win32-v0.3.x.exe --no_database --mock` 3. Start gobot_editor_win_x64_v0.3.x and fill in the driver address http://127.0.0.1:8888 -4. If using for the first time, you can find sample robots in the /demos directory and load them on the bots page. +4. If using for the first time, you can find sample robots in the /sample directory and load them on the bots page. ## Feature @@ -51,6 +51,11 @@ function execute() -- Here, users can define the execution logic of nodes themselves (for example, sending an HTTP request) res, err = http.post("url", req) + -- todo + + -- state - State code + -- res - Information displayed in the Response panel + return state.Succ, res end ``` diff --git a/README_CN.md b/README_CN.md index 39d72dc..cccfc75 100644 --- a/README_CN.md +++ b/README_CN.md @@ -11,7 +11,7 @@ Gobot是一个功能强大的有状态API测试机器人。它提供图形界面 1. 在 release 页面下载指定版本的 编辑端(editor 以及 驱动端(driver 2. 在命令行以内存模式执行驱动端 `./gobot-driver-win32-v0.3.x.exe --no_database --mock` 3. 启动 gobot_editor_win_x64_v0.3.x ,并将 driver 地址填入 http://127.0.0.1:8888 -4. 如果是初次使用,可以在 /demos 目录中找到示例机器人,在bots页面中载入使用 +4. 如果是初次使用,可以在 /sample 目录中找到示例机器人,在bots页面中载入使用 ## 特性 * 使用`行为树`控制机器人的运行逻辑,使用`脚本`控制节点的具体行为(比如发起一次http请求 @@ -44,7 +44,13 @@ function execute() -- 用户可以在这里自行定义节点的执行逻辑(例如发送一次http请求 res, err = http.post("url", req) - + + -- todo + + -- 返回值 + -- state 状态码 + -- res 显示在 Response 面板的信息 + return state.Succ, res end ``` diff --git a/demos/http_test.txt b/sample/http_test.txt similarity index 100% rename from demos/http_test.txt rename to sample/http_test.txt diff --git a/demos/prefab/http_request.lua b/sample/prefab/http_request.lua similarity index 100% rename from demos/prefab/http_request.lua rename to sample/prefab/http_request.lua diff --git a/demos/prefab/mock_acc_info.lua b/sample/prefab/mock_acc_info.lua similarity index 100% rename from demos/prefab/mock_acc_info.lua rename to sample/prefab/mock_acc_info.lua diff --git a/demos/prefab/mock_hero_info.lua b/sample/prefab/mock_hero_info.lua similarity index 100% rename from demos/prefab/mock_hero_info.lua rename to sample/prefab/mock_hero_info.lua diff --git a/demos/prefab/mock_hero_lvup.lua b/sample/prefab/mock_hero_lvup.lua similarity index 100% rename from demos/prefab/mock_hero_lvup.lua rename to sample/prefab/mock_hero_lvup.lua diff --git a/demos/prefab/mock_login_guest.lua b/sample/prefab/mock_login_guest.lua similarity index 100% rename from demos/prefab/mock_login_guest.lua rename to sample/prefab/mock_login_guest.lua