generate_automation_from_testcases

generate_automation_from_testcases is a command for Claude Code from anhtester/claude-testing-kit. It costs 24 tokens per session (3,863 once invoked), scanned A, original, MIT.

A workflow that converts written manual test cases into automated scripts by inspecting the real application in a browser. It creates page-object-based code, runs the tests, and can correct failures.

In plain words
What is it for?
Use it to automate manual browser tests with Playwright, Selenium, or Appium-style workflows, then run and stabilize the resulting scripts.
Why use it?
It removes repetitive translation from human test instructions to code and avoids relying on guessed page locators or test data.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/anhtester/claude-testing-kit/generate_automation_from_testcases
Clone the repo
git clone --depth 1 https://github.com/anhtester/claude-testing-kit

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for generate_automation_from_testcases

README.md
[![agentmods](https://agentmods.dev/badge/commands/anhtester/claude-testing-kit/generate_automation_from_testcases.svg)](https://agentmods.dev/commands/anhtester/claude-testing-kit/generate_automation_from_testcases)
Your own site
<a href="https://agentmods.dev/commands/anhtester/claude-testing-kit/generate_automation_from_testcases"><img src="https://agentmods.dev/badge/commands/anhtester/claude-testing-kit/generate_automation_from_testcases.svg" alt="Measured on agentmods" height="20"></a>
Per session 24 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,863 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00024 $0.03863
Opus 5 $0.00012 $0.01931
Sonnet 5 $0.00005 $0.00773
Haiku 4.5 $0.00002 $0.00386

Measured 5d ago against content hash 7d6a36af6e04, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

generate_automation_from_testcases scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.claude/commands/generate_automation_from_testcases.md · 320 lines

How it starts

The opening of the file, as written. The whole thing — 320 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Workflow: Sinh Automation Scripts từ Manual Test Cases

BẮT BUỘC (MANDATORY SKILLS): Bạn PHẢI nạp và đọc kỹ nội dung các skills sau trước khi bắt đầu:

  • skills-qa-automation-engineer (.claude/skills/skills-qa-automation-engineer/SKILL.md) — Quy tắc automation chung + workflow routing
  • skills-ui-debug-agent (.claude/skills/skills-ui-debug-agent/SKILL.md) — Inspect DOM, thu thập locators
  • skills-smart-locator-agent (.claude/skills/skills-smart-locator-agent/SKILL.md) — Sinh locator ổn định
  • skills-test-data-generator (.claude/skills/skills-test-data-generator/SKILL.md) — Sinh test data unique, traceable

Workflow này giúp agent đọc file manual test cases do user cung cấp, tự mở browser inspect UI, thu thập locators thực tế, sinh automation scripts hoàn chỉnh (POM + Test), chạy test và tự sửa lỗi cho đến khi PASS.

⚠️ Nguyên tắc thực thi

  • Vai trò: Agent đóng vai Senior Automation Engineer — tuân thủ Clean Code + POM
  • Tất cả output bằng Tiếng Việt
  • TUYỆT ĐỐI KHÔNG ĐOÁN locator — phải inspect DOM thực tế bằng MCP browser tools
  • Desktop viewport 1920×1080 cho tất cả UI debugging
  • ⚠️ Rule E3 (CRITICAL): Khi test FAIL → tự đọc log → phân tích → sửa code → chạy lại. CẤM hỏi user trong quá trình fix lỗi. Chỉ hỏi khi gặp business rule mâu thuẫn hoặc hết 5 vòng auto-heal
  • Artifact task.md — PHẢI tạo để theo dõi tiến độ 6 bước

Workflow này khác gì generate_automation_from_ui_flow?

from_testcases (workflow này) from_ui_flow
Input File manual test cases có cấu trúc (MD/Excel/JSON) Mô tả UI steps bằng lời hoặc chỉ URL
Đã có TC ✅ Có sẵn — đọc và convert ❌ Chưa có — agent tự khám phá
Approach Đọc TC → inspect UI verify → sinh code Chạy thật trên browser → thu thập → sinh code

Input cần thu thập

Input Cách lấy Độ ưu tiên
File test cases (MD/Excel/JSON/URL) User cung cấp path hoặc URL ⭐ Bắt buộc
URL ứng dụng User cung cấp hoặc trong TC ⭐ Bắt buộc
Credentials (nếu cần login) User cung cấp hoặc dùng fixture sẵn Tùy chọn
Tech stack User chỉ định hoặc detect từ project Tùy chọn

Read the full file on GitHub · 320 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 320 lines · 24 tokens per session scan A 7d6a36af6e04

Subscribe to this mod's changes

generate_automation_from_testcases is a command published in the GitHub repository anhtester/claude-testing-kit (50 stars, last pushed 27d ago), licensed MIT. It adds 24 tokens to every session and 3,863 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.