Test
Claude Code + Codex 自動連携テンプレート - AI駆動開発の効率化
npx -y skills add AI-Driven-School/aiki --skill testAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Generate E2E and unit test code from requirements using Playwright, delegated to Codex. Use when writing tests, checking acceptance criteria coverage, or running /test.
SKILL.md
4.1 KB, as published. Nobody here has run it
/test スキル
実装コードと要件定義からテストコードを自動生成します。
使用方法
/test
/test auth
/test --e2e
/test --unit
実行フロー
[1] 要件定義の読み込み
└─ docs/requirements/*.md(受入条件)
[2] 実装コードの確認
└─ src/**/*
[3] Codexに委譲
└─ codex exec "..." --full-auto
[4] テストファイル生成
└─ tests/**/*.spec.ts
Codex委譲コマンド
codex exec "
以下の受入条件を全てカバーするE2Eテストを生成してください。
【受入条件】
$(cat docs/requirements/{feature}.md | grep -A 100 '## 受入条件')
【テスト要件】
- Playwright使用
- 各受入条件に対応するテストケース
- Happy path + Edge case
- 適切なセレクタ(data-testid推奨)
- 日本語でテスト名を記述
【テンプレート】
import { test, expect } from '@playwright/test';
test.describe('{機能名}', () => {
test('{受入条件1}', async ({ page }) => {
// Arrange
// Act
// Assert
});
});
" --full-auto
生成されるテスト構成
tests/
├── {feature}.spec.ts # E2Eテスト
├── {feature}.unit.spec.ts # ユニットテスト(オプション)
└── fixtures/
└── {feature}.json # テストデータ
テストテンプレート
import { test, expect } from '@playwright/test';
test.describe('ユーザー認証', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/login');
});
test('メールとパスワードでログインできる', async ({ page }) => {
// Arrange
await page.fill('[data-testid="email-input"]', '[email protected]');
await page.fill('[data-testid="password-input"]', 'password123');
// Act
await page.click('[data-testid="login-button"]');
// Assert
await expect(page).toHaveURL('/dashboard');
await expect(page.locator('[data-testid="welcome-message"]')).toBeVisible();
});
test('無効なパスワードでエラーが表示される', async ({ page }) => {
// Arrange
await page.fill('[data-testid="email-input"]', '[email protected]');
await page.fill('[data-testid="password-input"]', 'wrong');
// Act
await page.click('[data-testid="login-button"]');
// Assert
await expect(page.locator('[data-testid="error-message"]')).toHaveText(
'メールアドレスまたはパスワードが正しくありません'
);
});
});
出力例
> /test auth
🧪 テストを生成します... (Codex)
要件定義を読み込み中...
✓ docs/requirements/auth.md(受入条件: 5件)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 Codex (full-auto) でテスト生成中...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[Codex] tests/auth.spec.ts を作成中...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ テスト生成完了!
生成ファイル:
→ tests/auth.spec.ts
テストケース: 6件
✓ メールとパスワードでログインできる
✓ 認証成功時、ダッシュボードにリダイレクトされる
✓ 認証失敗時、エラーメッセージが表示される
✓ 空のフィールドでバリデーションエラー
✓ ログアウトでセッション終了
✓ セッション切れでログイン画面にリダイレクト
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
テスト実行: npx playwright test tests/auth.spec.ts
Gives 0 of the 12 instructions most e2e browser skills give
Counted across 407 of the 410 authors here whose files we hold, read 2026-08-06
- use page object model patternin 35 of 407, across 25 files
- Snapshot to get element refsin 24 of 407, across 14 files
- keep tests independentin 23 of 407, across 18 files
- Interact using refs from the latest snapshotin 23 of 407, across 11 files
- clean up test data after each testin 21 of 407, across 15 files
- test user behavior not implementationin 20 of 407, across 14 files
- quarantine flaky tests explicitlyin 19 of 407, across 10 files
- wait for specific network conditionsin 18 of 407, across 8 files
- re-snapshot after navigation or dom changesin 17 of 407, across 10 files
- Detect running dev servers before writing test codein 17 of 407, across 7 files
- use web-first assertionsin 17 of 407, across 14 files
- capture screenshots or videos on test failurein 17 of 407, across 14 files
Said here and by no other author read
- read requirements definitions
- check implementation code
- delegate test generation to Codex
- cover all acceptance criteria
- write test names in Japanese
- structure tests using Arrange Act Assert
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once.