qa-test-automation-arch

qa-test-automation-arch is a skill for Claude Code from Kokxi/qa-test-skills. It costs 132 tokens per session (2,334 once invoked), scanned A, original, MIT.

A guide for designing maintainable automated testing systems before writing test code. It covers test layers, reusable patterns, test-data separation, and continuous integration (automated checks run during development).

In plain words
What is it for?
Use it to choose UI, API, or unit testing approaches, plan unit and integration tests, organize test data, and design a continuous-integration setup.
Why use it?
It prevents test suites from becoming costly to change or dependent on their underlying tools. Clear layers let test writers focus on scenarios without needing to understand every implementation detail.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the qa-test-skills plugin — 49 skills shipped together

Good fit Use it to choose UI, API, or unit testing approaches, plan unit and integration tests, organize test data, and design a continuous-integration setup.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kokxi/qa-test-skills/qa-test-automation-arch
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.

Any agent
npx skills add Kokxi/qa-test-skills --skill qa-test-automation-arch
Clone the repo
git clone --depth 1 https://github.com/Kokxi/qa-test-skills

Made for: Claude Code.

Or install qa-test-skills, the plugin that ships this one along with the rest of its 49 skills.

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 qa-test-automation-arch

README.md
[![agentmods](https://agentmods.dev/badge/skills/kokxi/qa-test-skills/qa-test-automation-arch/github.svg)](https://agentmods.dev/skills/kokxi/qa-test-skills/qa-test-automation-arch)
Your own site
<a href="https://agentmods.dev/skills/kokxi/qa-test-skills/qa-test-automation-arch"><img src="https://agentmods.dev/badge/skills/kokxi/qa-test-skills/qa-test-automation-arch/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for qa-test-automation-arch

Your own site · 80×15
<a href="https://agentmods.dev/skills/kokxi/qa-test-skills/qa-test-automation-arch"><img src="https://agentmods.dev/badge/skills/kokxi/qa-test-skills/qa-test-automation-arch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 132 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,334 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00132 $0.02334
Opus 5 $0.00066 $0.01167
Sonnet 5 $0.00026 $0.00467
Haiku 4.5 $0.00013 $0.00233

Measured 6d ago against content hash 2daae8ffb11d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

qa-test-automation-arch 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 6d 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.

skills/qa-test-automation-arch/SKILL.md · 249 lines

How it starts

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

⚠️ 安全警告:本技能的示例可能涉及订单号、支付金额、截图、身份证、手机号等敏感数据。 实际使用时请勿粘贴真实生产数据、客户信息或财务凭证;测试前应脱敏/掩码处理。 本技能仅在 workspace/ 输出评估文件,不持久化、不外传、不跨会话复用。

测试自动化架构设计

核心原则

好的自动化架构——分层清晰、职责单一、易于维护、快速反馈。

测试自动化金字塔

📌 本节与 qa-test-strategy-design「测试金字塔」概念对应,但分层名称和比例不同——本技能侧重自动化落地(集成测试层名、70/20/10 比例),strategy-design 侧重策略规划(接口测试层名、60/30/10 比例)。修改时请确认两处含义,避免矛盾。

                    ┌─────────────┐
                    │   E2E测试    │  10%
                    │  (UI/API)    │
                    ├─────────────┤
                    │  集成测试    │  20%
                    │ (接口/服务)  │
                    ├─────────────┤
                    │  单元测试    │  70%
                    │  (函数/类)   │
                    └─────────────┘

分层架构设计

第1层:单元测试层

职责:
├─ 测试范围:函数、类、模块
├─ 执行速度:毫秒级
├─ 维护成本:低
└─ 覆盖目标:核心逻辑

技术选型:
├─ Java:JUnit 5 + Mockito
├─ Python:Pytest + Mock
├─ JavaScript:Jest + Sinon
└─ Go:testing + testify

最佳实践:
├─ 测试与代码同步维护
├─ 每个测试单一职责
├─ 使用Mock隔离依赖
├─ 测试命名清晰(Given-When-Then)
└─ 保持测试快速(<100ms)

第2层:集成测试层

职责:
├─ 测试范围:接口、服务间交互
├─ 执行速度:秒级
├─ 维护成本:中
└─ 覆盖目标:业务流程

技术选型:
├─ API测试:Postman/Newman/REST Assured
├─ 数据库测试:TestContainers
├─ 消息队列测试:Embedded Kafka
└─ 服务虚拟化:WireMock/Mountebank

最佳实践:
├─ 使用真实依赖(TestContainers)
├─ 测试数据可构造、可清理
├─ 验证接口契约
├─ 覆盖正常/异常/边界场景
└─ 保持测试独立性

第3层:E2E测试层

职责:
├─ 测试范围:完整用户流程
├─ 执行速度:分钟级
├─ 维护成本:高
└─ 覆盖目标:核心路径

技术选型:
├─ Web UI:Playwright/Cypress/Selenium
├─ 移动端:Appium/XCUITest/Espresso
├─ 桌面端:Electron Test/WinAppDriver
└─ 性能:JMeter/Locust/k6

最佳实践:
├─ 只覆盖核心路径(20%)
├─ 使用Page Object模式
├─ 数据驱动测试
├─ 稳定的等待策略
└─ 失败时自动截图/录屏

框架设计模式

Page Object Model

优点:
├─ 封装页面元素和操作
├─ 减少代码重复
├─ 易于维护
└─ 可读性强

示例结构:
tests/
├── pages/
│   ├── login_page.py
│   ├── home_page.py
│   └── cart_page.py
├── tests/
│   ├── test_login.py
│   ├── test_home.py
│   └── test_cart.py
├── fixtures/
│   ├── test_data.py
│   └── setup_teardown.py
└── utils/
    ├── driver_factory.py
    └── report_generator.py

关键字驱动

优点:
├─ 业务人员可参与
├─ 测试用例可读性强
├─ 与实现分离
└─ 易于复用

示例:
| 关键字 | 参数1 | 参数2 | 参数3 |
|--------|-------|-------|-------|
| 打开浏览器 | Chrome | | |
| 输入用户名 | testuser | | |
| 输入密码 | Test@123 | | |
| 点击登录 | | | |
| 验证跳转 | /home | | |

Read the full file on GitHub · 249 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. 6d ago Changed 2daae8ffb11d
  2. 11d ago First seen · 249 lines · 132 tokens per session scan A b300d2d3ca13

Subscribe to this mod's changes

qa-test-automation-arch is a skill published in the GitHub repository Kokxi/qa-test-skills (25 stars, last pushed 8d ago), licensed MIT. It adds 132 tokens to every session and 2,334 once invoked, about $0.0007 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.