senclaw/autotest
app Tự động hoá kiểm thử cục bộ 100%: định nghĩa bộ kiểm thử (suite) gồm các test case 3 loại — API HTTP (method/url/headers/body + assertion status, body chứa, JSON path, header, thời gian phản hồi), script/CLI (chạy lệnh shell + assertion exit code, stdout/stderr), và web UI (điều khiển trình duyệt qua app Mini Browser: navigate, hành động ngôn ngữ tự nhiên tự-kiểm-chứng, assert nội dung trang/URL). Biến môi trường {{var}} theo từng environment + trích xuất biến từ response nối chuỗi giữa các case (login lấy token → case sau dùng). Chạy tay hoặc theo lịch định kỳ, lưu toàn bộ lịch sử chạy + log + kết quả từng assertion, dashboard tỷ lệ pass, phát hiện test flaky (lúc pass lúc fail), thống kê case hay hỏng nhất. AI qua bridge SenClaw: sinh test case từ mô tả/OpenAPI/curl và chẩn đoán nguyên nhân lần chạy fail. App chỉ chạy test do người dùng tự định nghĩa trên máy mình.
Install
senclaw app install senclaw/autotest
Verifies sha512 and SenClaw’s signature before writing to disk.
Documentation
SenClaw AutoTest — Tự Động Hoá Kiểm Thử
Space App tự động hoá kiểm thử, dữ liệu 100% local (SQLite tại ~/.senclaw/apps/autotest/autotest.db). Port 4640, MCP server **autotest-mcp** (tool prefix autotest_, 21 tools).
Tính năng
- Bộ kiểm thử (suite) + test case 3 loại:
http— gọi API: method/url/headers/body; assertionstatus,json(path + op),body_contains,header,duration_max_ms.script— chạy lệnh shell người dùng định nghĩa; assertionexit_code,stdout_contains,stdout_matches(regex),stderr_contains.web— điều khiển app Mini Browser (port 4360) qua MCP HTTP: stepsnavigate/act(mô tả tiếng tự nhiên, tự kiểm chứng) /wait; assertiontext_contains,url_containstrên trang cuối.- **Environment + biến
{{var}}** — thay trong toàn bộ config/assertions/extract (thay sau parse, trên từng string — không bao giờ phá JSON). - Extract nối chuỗi biến — case login trích
tokentừ response (json path / header / regex) → case sau dùng{{token}}trong cùng lần chạy suite. - Chạy tay / theo lịch — scheduler nền quét mỗi 30s, interval theo phút từng suite.
- Lịch sử + báo cáo — log request/response/stdout đầy đủ, kết quả từng assertion (desc/pass/actual/expected), xu hướng pass, phát hiện flaky (≥2 lần đổi trạng thái pass↔fail trong 10 kết quả gần nhất), case fail nhiều nhất 30 ngày.
- AI qua bridge SenClaw —
autotest_ai_generatesinh test case từ mô tả/OpenAPI/ curl (validate + normalize từng case trước khi ghi);autotest_ai_diagnosechẩn đoán run fail, phân biệt lỗi sản phẩm vs lỗi test.
Chạy dev
cargo run -p autotest # backend :4640 (serve web/dist nếu đã build)
cd apps/autotest/web && npm run dev # UI dev :5173, proxy /api → :4640
cargo test -p autotest # 37 unit testsEnv: PORT (mặc định 4640), SENCLAW_DATA_DIR (đổi chỗ chứa DB), AUTOTEST_BROWSER_URL (Mini Browser, mặc định http://127.0.0.1:4360 — đổi được trong tab Lịch chạy → Cài đặt).
Đóng gói
apps/autotest/scripts/pack.sh # → apps/autotest/autotest-app.zipKiến trúc
src/
main.rs — axum server + serve web_dist
db.rs — SQLite: suites/cases/environments/runs/results/schedules/activity
tmpl.rs — {{var}} substitution + json path (dot notation)
assert.rs — engine đánh giá assertion (3 loại case)
runner.rs — thực thi http (reqwest) / script (sh -c, kill_on_drop) / web
(Mini Browser MCP), timeout per-case, cancel per-run, extract biến
sched.rs — vòng lặp lịch chạy định kỳ (30s tick, tuần tự)
llm.rs — AI generate (parse + repair mảng JSON, chặn finish=length) + diagnose
api.rs — REST; mọi handler qua *_value helpers
mcp.rs — MCP HTTP+SSE, 21 tools autotest_*, dùng chung *_value với REST
web/ — React 19 + Vite + AntD 6 (dark), tabs: Tổng quan / Bộ kiểm thử /
Lịch sử chạy / Môi trường / Lịch chạy / Hoạt độngGhi chú an toàn: app chỉ chạy test do người dùng tự định nghĩa trên máy của họ; không có tool nào tự ý gọi ra ngoài trừ API đích mà test nhắm tới, bridge LLM của daemon và Mini Browser local.
Declared permissions
{
"network": [
"127.0.0.1"
],
"exec": [
"./autotest"
]
}Declared by the publisher, not enforced by SenClaw. The CLI compares this against what you already have installed and asks before anything widens.
Published by
The checkmark means SenClaw confirmed who this publisher is. It says nothing about whether their packages are safe.
About
| Owner | @senclaw |
| Latest | 1.0.0 |
| Downloads (30d) | 0 |
| Repository | github.com/NortonBen/senclaw-app ↗ |
Versions
| Version | Tags | Artifacts | Published |
|---|---|---|---|
1.0.0 | latest | darwin-arm64, linux-x64, win32-x64 | 2026-08-07 |
Artifacts · 1.0.0
| Platform | Format | Signature | File | Size |
|---|---|---|---|---|
darwin-arm64 | zip | unsigned | autotest-app.zip | 3402 KB |
linux-x64 | zip | unsigned | autotest-app.zip | 3821 KB |
win32-x64 | zip | unsigned | autotest-app.zip | 3765 KB |
Unsigned builds require sign-in to download and are not distributed to the auto-updater, because unsigned executables from a new domain get flagged as unsafe. Sign and notarize (macOS) or Authenticode-sign (Windows) to distribute publicly.
Auto-update endpoints
For a Tauri app — add to tauri.conf.json:
"endpoints": ["https://senclaw.bacnd.com/api/v1/updates/tauri/senclaw/autotest/{{target}}/{{arch}}/{{current_version}}"]For an electron-updater app — generic provider URL:
https://senclaw.bacnd.com/updates/senclaw/autotest/stable
Only signed/notarized artifacts are offered as updates — a client fetches the update without credentials, and unsigned binaries are not publicly downloadable.
Something wrong with this package?
Report this package
Report this package
Tell us what is wrong and a moderator will look at it. Be specific — a report that names a version and a behaviour can be checked in minutes; one that says “looks sketchy” cannot be acted on at all.
Not about this package? Contact us instead. What happens to a report is described in reporting and moderation.
API: GET https://senclaw.bacnd.com/api/v1/packages/senclaw/autotest