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.
npx agentmods add skills/wangjianqi/appstore/13-testingnpx skills add wangjianqi/AppStore --skill 13-testinggit clone --depth 1 https://github.com/wangjianqi/AppStoreWrote 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.
[](https://agentmods.dev/skills/wangjianqi/appstore/13-testing)<a href="https://agentmods.dev/skills/wangjianqi/appstore/13-testing"><img src="https://agentmods.dev/badge/skills/wangjianqi/appstore/13-testing.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00034 | $0.02583 |
| Opus 5 | $0.00017 | $0.01291 |
| Sonnet 5 | $0.00007 | $0.00517 |
| Haiku 4.5 | $0.00003 | $0.00258 |
Grade A, and why
testing 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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 372 lines — stays where its author put it; the contents beside it link to each section on GitHub.
测试
测试分层
| 层级 | 类型 | 占比 | 速度 | 目标 |
|---|---|---|---|---|
| ViewModel / Service | 单元测试 | 70% | 快(< 0.1s) | 逻辑正确性 |
| Repository / Storage | 集成测试 | 20% | 中(< 1s) | 数据层协作 |
| ViewController | UI 测试 | 10% | 慢(> 2s) | 关键用户流程 |
原则:
- ViewModel 和 Service 是测试重点,覆盖率目标 > 80%
- VC 不写单元测试(太脆弱),用 UI 测试覆盖关键路径
- Repository 层用内存数据库测试,不依赖真实 CoreData
项目配置
目录约定
AppTests/
├── ViewModels/ # ViewModel 单元测试
│ └── CameraViewModelTests.swift
├── Services/ # Service 单元测试
│ └── AuthServiceTests.swift
├── Repositories/ # Repository 集成测试
│ └── UserRepositoryTests.swift
├── UI/ # UI 测试
│ └── LoginFlowTests.swift
├── Helpers/ # 测试辅助
│ ├── MockNetworkService.swift
│ ├── StubData.swift
│ └── CoreDataTestStack.swift
└── Extensions/ # 测试扩展
└── XCTestCase+Async.swift
测试 Target 配置
- Unit Test Target:
AppTests,Host Application 设为主 App - UI Test Target:
AppUITests,独立进程运行 @testable import App允许访问 internal 成员
单元测试
ViewModel 测试模板
import XCTest
@testable import App
final class CameraViewModelTests: XCTestCase {
private var sut: CameraViewModel!
private var mockCameraService: MockCameraService!
override func setUp() {
super.setUp()
mockCameraService = MockCameraService()
sut = CameraViewModel(cameraService: mockCameraService)
}
override func tearDown() {
sut = nil
mockCameraService = nil
super.tearDown()
}
func testStartCapture_whenAuthorized_callsServiceStart() async {
mockCameraService.authorizationStatus = .authorized
await sut.startCapture()
XCTAssertTrue(mockCameraService.startCaptureCalled)
}
func testStartCapture_whenDenied_showsAlert() async {
mockCameraService.authorizationStatus = .denied
await sut.startCapture()
XCTAssertTrue(sut.showPermissionAlert)
XCTAssertFalse(mockCameraService.startCaptureCalled)
}
}
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.
- 3d ago First seen · 372 lines · 34 tokens per session scan A cf506d48db57
testing is a skill published in the GitHub repository wangjianqi/AppStore (10 stars, last pushed 3mo ago), licensed MIT. It adds 34 tokens to every session and 2,583 once invoked, about $0.0002 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-31.
Other skills, from other repositories
test-flutter
Flutter App のテスト実行・静的解析・フォーマット・テスト記述ガイド.
test
Run tests. Use after code changes to validate. Arguments: unit (default, no GPU), e2e (with models), filter name, or all.
neo-cli-testing
Run and reason about the Neo CLI test layers under neo/ - unit, integration, e2e, and the generated-project / Neo-on-Neo smoke verification. Use before declaring any neo/ change done, or on "run the neo tests / cargo test / integration / e2e". Wraps the right command per layer inside nix develop, states network/Nix…
dotnet-testing-advanced-tunit-advanced
TUnit 進階應用完整指南。當需要使用 TUnit 進行資料驅動測試、依賴注入或整合測試時使用。涵蓋 MethodDataSource、ClassDataSource、Matrix Tests、Properties 過濾。包含 Retry/Timeout 控制、WebApplicationFactory 整合、Testcontainers 多服務編排。 Make sure to use this skill whenever the user mentions TUnit advanced, MethodDataSource, ClassDataSource, Matrix Tests, TUnit dependency…
build-and-verify
Build, test, and end-to-end verify the Multiplex visionOS/iPadOS SSH-tmux terminal app. Use this whenever you need to compile the app, run its unit tests, regenerate the Xcode project after editing project.yml or adding/ removing source files, or confirm a change works in the real app on the visionOS or iPad…
test-audit
Static test-suite quality audit - coverage from lcov/Istanbul/Cobertura/go/tarpaulin reports, pyramid shape (unit/integration/e2e ratio), anti-patterns (.only leaks, skipped tests, no-assertion tests, hardcoded sleeps). Stack-aware across 11 supported stacks.