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; assertion status, json (path + op), body_contains, header, duration_max_ms.
  • script — chạy lệnh shell người dùng định nghĩa; assertion exit_code, stdout_contains, stdout_matches (regex), stderr_contains.
  • web — điều khiển app Mini Browser (port 4360) qua MCP HTTP: steps navigate / act (mô tả tiếng tự nhiên, tự kiểm chứng) / wait; assertion text_contains, url_contains trê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 token từ 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 SenClawautotest_ai_generate sinh test case từ mô tả/OpenAPI/ curl (validate + normalize từng case trước khi ghi); autotest_ai_diagnose chẩ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 tests

Env: 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.zip

Kiế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 động

Ghi 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

@senclawtrusted
benji
44 packages · 0 downloads · member since 2026-07 · GitHub since 2015-06

The checkmark means SenClaw confirmed who this publisher is. It says nothing about whether their packages are safe.

About

Owner@senclaw
Latest1.0.0
Downloads (30d)0
Repositorygithub.com/NortonBen/senclaw-app

Versions

VersionTagsArtifactsPublished
1.0.0latestdarwin-arm64, linux-x64, win32-x642026-08-07

Artifacts · 1.0.0

PlatformFormatSignatureFileSize
darwin-arm64zipunsignedautotest-app.zip3402 KB
linux-x64zipunsignedautotest-app.zip3821 KB
win32-x64zipunsignedautotest-app.zip3765 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