Skip to content

Develop#169

Merged
sliverp merged 12 commits intomainfrom
develop
Mar 14, 2026
Merged

Develop#169
sliverp merged 12 commits intomainfrom
develop

Conversation

@sliverp
Copy link
Collaborator

@sliverp sliverp commented Mar 14, 2026

PR Type / PR 类型

  • Bug fix / Bug 修复
  • New feature / 新功能
  • Refactoring / 代码重构
  • Documentation / 文档更新
  • Other / 其他: _______________

What does this PR solve? / 这个 PR 解决了什么问题?

Fixes #

How did you test this PR? / 你是如何测试的?

  • Ran local tests / 本地运行测试通过
  • Wrote new unit tests / 编写了新的单元测试
  • Covered existing test cases / 覆盖了旧的测试用例

Test Report / 测试报告

Paste test report here / 在此粘贴测试报告
(paste report content here / 粘贴报告内容)

Screenshots / 截图 (Optional / 可选)

Checklist / 检查清单

  • I have read the contributing guide (CONTRIBUTING.md) / 我已阅读贡献指南
  • Code passes all CI checks / 代码通过了所有 CI 检查
  • I have updated relevant documentation / 我已更新相关文档
  • I have attached the E2E test report / 我已上传 E2E 测试报告

⚠️ How to Run E2E Tests / 如何运行 E2E 测试

Step 1: Configure environment / 配置环境变量

cp tests/.env.example tests/.env

Edit tests/.env and fill in real values / 编辑 tests/.env 填入真实值:

BOT1_APPID=your-bot1-appid
BOT1_SECRET=your-bot1-secret
BOT1_TEST_OPENID=openid-seen-by-bot1

BOT2_APPID=your-bot2-appid
BOT2_SECRET=your-bot2-secret
BOT2_TEST_OPENID=openid-seen-by-bot2

Step 2: Get OpenIDs / 获取 OpenID

EN: Each bot (AppID) generates unique OpenIDs for users, groups, and guilds. The same real user will have different OpenIDs across different bots. If you need cross-bot identity mapping, a unionid-like mechanism will be provided in the future.

CN: 不同的 Bot(AppID)获取到的用户 OpenID、群 OpenID、频道 OpenID 均不相同。同一个真实用户在不同 Bot 下的 OpenID 是不一样的。若跨业务有关联用户身份需求,后续会提供跨 AppID 绑定后,使用类似 unionid 的机制打通身份。

  1. Start Bot1 / 启动 Bot1
  2. Send a message to Bot1 from your QQ account / 用你的 QQ 号主动给 Bot1 发一条消息
  3. Check Bot1's logs — find the user's OpenID in the incoming message log / 在 Bot1 的运行日志中找到你的 OpenID
  4. Fill it into BOT1_TEST_OPENID / 填入 BOT1_TEST_OPENID
  5. Repeat for Bot2 — you will get a different OpenID / 对 Bot2 重复以上步骤,会得到不同的 OpenID
  6. Fill it into BOT2_TEST_OPENID / 填入 BOT2_TEST_OPENID

⚠️ You must repeat this for each bot — Bot1 and Bot2 will see different OpenIDs for the same user.

⚠️ 每个 Bot 都要分别操作 —— Bot1 和 Bot2 看到的同一用户的 OpenID 是不同的

Step 3: Start Docker / 启动 Docker

sudo service docker start

Step 4: Run tests / 运行测试

sudo npm test

This will / 该命令会:

  • Build a Docker image with OpenClaw + test scripts / 构建包含 OpenClaw 和测试脚本的 Docker 镜像
  • Run tests inside the container: plugin install → add channels → restart gateway → send text & file messages / 在容器内运行测试:安装插件 → 添加 channel → 重启 gateway → 发送文本和文件消息
  • Save reports to tests/reports/ / 将报告保存到 tests/reports/
  • Clean up Docker containers and images after completion / 测试完成后自动清理 Docker 容器和镜像

Step 5: Check reports / 查看报告

tests/reports/report-<version>-<timestamp>.json   # JSON format
tests/reports/report-<version>-<timestamp>.txt    # Text format

Please attach the report in your PR. / 请在 PR 中上传测试报告。

@sliverp sliverp merged commit 53b6dd8 into main Mar 14, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants