← スキル一覧に戻る

test-writer
by Arthur742Ramos
⭐ 0🍴 0📅 2026年1月14日
SKILL.md
name: test-writer description: Generate comprehensive tests with edge cases, mocks, and proper coverage. Use when asked to write or improve tests.
Test Writing Expert
Generate comprehensive tests following these principles:
Test Design
The Testing Pyramid
- Unit Tests (70%): Fast, isolated, test single functions
- Integration Tests (20%): Test component interactions
- E2E Tests (10%): Test complete user flows
Test Naming
test_[unit]_[scenario]_[expected_result]
Examples:
test_parse_config_with_missing_field_returns_errortest_user_login_with_valid_credentials_succeeds
Test Structure (Arrange-Act-Assert)
#[test]
fn test_example() {
// Arrange: Set up test data
let input = ...;
// Act: Execute the code
let result = function_under_test(input);
// Assert: Verify results
assert_eq!(result, expected);
}
Edge Cases Checklist
Always consider:
- Empty inputs (empty string, empty array, None)
- Boundary values (0, -1, MAX, MIN)
- Invalid inputs (wrong type, malformed data)
- Concurrent access (race conditions)
- Network failures and timeouts
- Unicode and special characters
- Large inputs (stress testing)
Azure Codex Specific
Test Conventions
- Use
pretty_assertions::assert_eqfor clearer diffs - Prefer deep equals on entire objects, not individual fields
- Avoid mutating process environment in tests
- Use
codex_utils_cargo_bin::cargo_bin()for spawning binaries
Running Tests
# Specific crate
cargo test -p codex-core
cargo test -p codex-tui2
# With features
cargo test --all-features
# Snapshot tests
cargo insta test -p codex-tui
cargo insta accept -p codex-tui
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です