Source profileQuality 93/100

AsiaOstrich/universal-dev-standards/skills/testing-guide/SKILL.md

testing-guide

Testing pyramid and test writing standards for UT/IT/ST/E2E. Supports ISTQB and Industry Pyramid frameworks. Use when: writing tests, discussing test coverage, test strategy, or test naming. Not for: driving a Red-Green-Refactor cycle — use /tdd; measuring achieved coverage — use /coverage. Keywords: test, unit, integration, e2e, coverage, mock, ISTQB, SIT.

Source repository stars
71
Declared platforms
0
Static risk flags
0
Last source update
2026-08-25
Source checked
2026-08-25

Decision brief

What it does: where it fits

Language: English | 繁體中文

Best for

  • This skill provides testing pyramid standards and best practices for systematic testing, supporting both ISTQB and Industry Pyramid frameworks.

Not for

  • ❌ Test Interdependence (tests must run in order)
  • ❌ Flaky Tests (sometimes pass, sometimes fail)

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/AsiaOstrich/universal-dev-standards --skill "skills/testing-guide"
Safe inspection promptEditorial

Inspect the Agent Skill "testing-guide" from https://github.com/AsiaOstrich/universal-dev-standards/blob/a61aabdb5bffea6179ef28b804a16cdf9b77a164/skills/testing-guide/SKILL.md at commit a61aabdb5bffea6179ef28b804a16cdf9b77a164. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    First-Time Setup

    If no configuration found and context is unclear:

    Ask the user: "This project hasn't configured testing standards. Would you like to customize coverage targets?"After user selection, suggest documenting in CONTRIBUTING.md:If no configuration found and context is unclear:
  2. 02

    Purpose

    This skill provides testing pyramid standards and best practices for systematic testing, supporting both ISTQB and Industry Pyramid frameworks.

    This skill provides testing pyramid standards and best practices for systematic testing, supporting both ISTQB and Industry Pyramid frameworks.
  3. 03

    Testing Skills Navigator | 測試技能導航

    UDS provides 6 testing-related skills. Use this decision tree to find the right one:

    UDS provides 6 testing-related skills. Use this decision tree to find the right one:
  4. 04

    Framework Selection

    Note on Integration Testing abbreviation: - IT (Integration Testing): Agile/DevOps communities - SIT (System Integration Testing): Enterprise/ISTQB contexts - Both refer to the same testing level

    IT (Integration Testing): Agile/DevOps communitiesSIT (System Integration Testing): Enterprise/ISTQB contextsBoth refer to the same testing level
  5. 05

    Quick Reference

    Review the “Quick Reference” section in the pinned source before continuing.

    Review and apply the “Quick Reference” source section.

Permission review

Static risk signals and limitations

No configured static risk pattern was detected

This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score93/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars71SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
AsiaOstrich/universal-dev-standards
Skill path
skills/testing-guide/SKILL.md
Commit
a61aabdb5bffea6179ef28b804a16cdf9b77a164
License
NOASSERTION
Collected
2026-08-25
Default branch
main
View the original SKILL.md

Testing Guide

Language: English | 繁體中文

Version: 1.2.0 Last Updated: 2026-01-29 Applicability: Claude Code Skills


Purpose

This skill provides testing pyramid standards and best practices for systematic testing, supporting both ISTQB and Industry Pyramid frameworks.

Testing Skills Navigator | 測試技能導航

UDS provides 6 testing-related skills. Use this decision tree to find the right one:

What do you want to do? | 你想做什麼?
├── Measure code coverage (lines/branches/functions)    → /coverage
├── Track which requirements have tests (AC traceability) → /ac-coverage
├── Develop with Test-Driven Development (Red-Green-Refactor) → /tdd
├── Write BDD scenarios (Given-When-Then)               → /bdd
├── Define acceptance tests with stakeholders            → /atdd
└── Learn testing standards and best practices           → /testing (this skill)
SkillFocus焦點
/testingStandards and best practices reference測試標準與最佳實踐參考
/coverageCode-level coverage analysis程式碼層級覆蓋率分析
/ac-coverageRequirement-level AC traceability需求層級 AC 可追蹤性
/tddRed-Green-Refactor development cycle紅-綠-重構開發循環
/bddBehavior scenarios with Given-When-ThenGiven-When-Then 行為場景
/atddAcceptance criteria with stakeholders與利害關係人定義驗收條件

Framework Selection

FrameworkLevelsBest For
ISTQBUT → IT/SIT → ST → AT/UATEnterprise, compliance, formal QA
Industry PyramidUT (70%) → IT (20%) → E2E (10%)Agile, DevOps, CI/CD

Note on Integration Testing abbreviation:

  • IT (Integration Testing): Agile/DevOps communities
  • SIT (System Integration Testing): Enterprise/ISTQB contexts
  • Both refer to the same testing level

Quick Reference

Testing Pyramid (Industry Standard)

              ┌─────────┐
              │   E2E   │  ← 10% (Fewer, slower)
             ─┴─────────┴─
            ┌─────────────┐
            │   IT/SIT    │  ← 20% (Integration)
           ─┴─────────────┴─
          ┌─────────────────┐
          │       UT        │  ← 70% (Unit)
          └─────────────────┘

Test Levels Overview

LevelScopeSpeedDependencies
UTSingle function/class< 100msMocked
IT/SITComponent interaction1-10sReal DB (containerized)
STFull system (ISTQB)MinutesProduction-like
E2EUser journeys30s+Everything real
AT/UATBusiness validation (ISTQB)VariesEverything real

Coverage Targets

MetricMinimumRecommended
Line70%85%
Branch60%80%
Function80%90%

Detailed Guidelines

For complete standards, see:

AI-Optimized Format (Token-Efficient)

For AI assistants, use the YAML format files for reduced token usage:

  • Base standard: ai/standards/testing.ai.yaml
  • Framework options:
    • ISTQB Framework: ai/options/testing/istqb-framework.ai.yaml
    • Industry Pyramid: ai/options/testing/industry-pyramid.ai.yaml
  • Test level options:
    • Unit Testing: ai/options/testing/unit-testing.ai.yaml
    • Integration Testing: ai/options/testing/integration-testing.ai.yaml
    • System Testing: ai/options/testing/system-testing.ai.yaml
    • E2E Testing: ai/options/testing/e2e-testing.ai.yaml
    • Security Testing: ai/options/testing/security-testing.ai.yaml
    • Performance Testing: ai/options/testing/performance-testing.ai.yaml
    • Contract Testing: ai/options/testing/contract-testing.ai.yaml
  • Skeleton templates (all levels, multi-language): test-skeleton-templates.md

Naming Conventions

File Naming

[ClassName]Tests.cs       # C#
[ClassName].test.ts       # TypeScript
[class_name]_test.py      # Python
[class_name]_test.go      # Go

Method Naming

[MethodName]_[Scenario]_[ExpectedResult]()
should_[behavior]_when_[condition]()
test_[method]_[scenario]_[expected]()

Test Doubles

TypePurposeWhen to Use
StubReturns predefined valuesFixed API responses
MockVerifies interactionsCheck method called
FakeSimplified implementationIn-memory database
SpyRecords calls, delegatesPartial mocking

When to Use What

  • UT: Use mocks/stubs for all external deps
  • IT: Use fakes for DB, stubs for external APIs
  • ST: Real components, fake only external services
  • E2E: Real everything

AAA Pattern

test('method_scenario_expected', () => {
    // Arrange - Setup test data
    const input = createTestInput();
    const sut = new SystemUnderTest();

    // Act - Execute behavior
    const result = sut.execute(input);

    // Assert - Verify result
    expect(result).toBe(expected);
});

FIRST Principles

  • Fast - Tests run quickly
  • Independent - Tests don't affect each other
  • Repeatable - Same result every time
  • Self-validating - Clear pass/fail
  • Timely - Written with production code

Anti-Patterns to Avoid

  • ❌ Test Interdependence (tests must run in order)
  • ❌ Flaky Tests (sometimes pass, sometimes fail)
  • ❌ Testing Implementation Details
  • ❌ Over-Mocking
  • ❌ Missing Assertions
  • ❌ Magic Numbers/Strings

Testing Theory Essentials (YAML Compressed)

# === ISTQB FUNDAMENTALS ===
terminology:
  error: "Human mistake in thinking"
  defect: "Bug in code (caused by error)"
  failure: "System behaves incorrectly (caused by defect)"
  chain: "Error → Defect → Failure"

oracle_problem:
  definition: "How do we know the expected result is correct?"
  approaches:
    - specification_oracle: "Compare against spec"
    - reference_oracle: "Compare against reference impl"
    - consistency_oracle: "Same input → same output"
    - heuristic_oracle: "Reasonable approximation"

# === STATIC vs DYNAMIC ===
static_testing:
  definition: "Examine without executing"
  techniques: [reviews, walkthroughs, inspections, static_analysis]
  finds: "Defects before runtime"
  examples: [ESLint, SonarQube, code_review]

dynamic_testing:
  definition: "Execute and observe behavior"
  techniques: [unit, integration, system, acceptance]
  finds: "Failures during execution"

# === TEST DESIGN TECHNIQUES ===
black_box:
  equivalence_partitioning:
    principle: "Divide inputs into equivalent classes"
    example: "Age: [<0 invalid], [0-17 minor], [18-64 adult], [65+ senior]"
  boundary_value:
    principle: "Test at boundaries of partitions"
    example: "Age: test -1, 0, 17, 18, 64, 65"
  decision_table:
    principle: "Combinations of conditions → actions"
    use: "Complex business rules"
  state_transition:
    principle: "Valid sequences of states"
    use: "Workflow, state machines"

white_box:
  statement_coverage: "Every statement executed once"
  branch_coverage: "Every decision branch taken"
  condition_coverage: "Every condition T/F"
  path_coverage: "Every possible path (often impractical)"

# === RISK-BASED TESTING ===
risk_assessment:
  likelihood: "How likely to fail?"
  impact: "How bad if fails?"
  priority: "likelihood × impact"

risk_matrix:
  high_high: "Test extensively, first priority"
  high_low: "Good coverage"
  low_high: "Good coverage"
  low_low: "Basic coverage"

# === DEFECT MANAGEMENT ===
defect_lifecycle:
  states: [new, assigned, in_progress, fixed, verified, closed]
  reopen_trigger: "Verification fails"

severity_vs_priority:
  severity: "Technical impact (critical/major/minor/trivial)"
  priority: "Business urgency (high/medium/low)"
  example: "Typo on login page: low severity, high priority (brand)"

# === TEST ENVIRONMENT ===
isolation_levels:
  unit: "In-memory, mocked deps"
  integration: "Containerized DB (Docker)"
  staging: "Production-like, isolated"
  production: "Real, feature flags for testing"

test_data_strategies:
  fixtures: "Static predefined data"
  factories: "Dynamic generation (faker)"
  snapshots: "Sanitized production copy"
  synthetic: "Algorithm-generated edge cases"

Configuration Detection

This skill supports project-specific configuration.

Detection Order

  1. Check CONTRIBUTING.md for "Disabled Skills" section
    • If this skill is listed, it is disabled for this project
  2. Check CONTRIBUTING.md for "Testing Standards" section
  3. If not found, default to standard coverage targets

First-Time Setup

If no configuration found and context is unclear:

  1. Ask the user: "This project hasn't configured testing standards. Would you like to customize coverage targets?"
  2. After user selection, suggest documenting in CONTRIBUTING.md:
## Testing Standards

### Coverage Targets
| Metric | Target |
|--------|--------|
| Line | 80% |
| Branch | 70% |
| Function | 85% |

Configuration Example

In project's CONTRIBUTING.md:

## Testing Standards

### Coverage Targets
| Metric | Target |
|--------|--------|
| Line | 80% |
| Branch | 70% |
| Function | 85% |

### Testing Framework
- Unit Tests: Jest
- Integration Tests: Supertest
- E2E Tests: Playwright

Next Steps Guidance | 下一步引導

After /testing completes, the AI assistant should suggest:

測試標準與最佳實踐已掌握。建議下一步 / Testing standards and best practices understood. Suggested next steps:

  • 執行 /tdd 開始測試驅動開發(紅-綠-重構循環) ⭐ Recommended / 推薦 — 將測試知識立即轉化為實踐 / Turn testing knowledge into practice immediately
  • 執行 /coverage 分析目前程式碼覆蓋率 — 找出測試缺口 / Identify testing gaps
  • 執行 /bdd 撰寫行為驅動的 Given-When-Then 場景 — 從使用者角度定義測試 / Define tests from user perspective

Related Standards


Version History

VersionDateChanges
1.2.02026-01-29Added links to new testing-theory.md knowledge base
1.1.02025-12-29Added Testing Theory Essentials YAML section
1.0.02025-12-24Initial: Standard sections (Purpose, Related Standards, Version History, License)

License

This skill is released under CC BY 4.0.

Source: universal-dev-standards

Frequently asked questions

What to verify before installation and use

What does the testing-guide source document cover?

Language: English | 繁體中文

How do I install testing-guide?

The source record exposes this install command: npx skills add https://github.com/AsiaOstrich/universal-dev-standards --skill "skills/testing-guide". Inspect the command and pinned source before running it.

Alternatives

Compare before choosing

Computed 10045,511

coreyhaines31/marketingskills

ab-testing

When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program

Computed 10029,034

garrytan/gbrain

bulk-ingestion

End-to-end discipline for turning any large data source (audio libraries, email takeouts, document corpora, chat exports, API dumps) into brain pages at scale. The lifecycle spine: SCHEMA → ACCESS → TRIAL → EVALUATE → IMPROVE → CODIFY → TEST → SKILLIFY → BULK → MONITOR. State is tracked in a durable JSON manifest (see MANIFEST-PATTERN.md) so any crash, session boundary, or subagent fan-out resumes from ground truth instead of memory.

Computed 10024,921

alirezarezvani/claude-skills

app-store-optimization

App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist

Computed 1005,241

dotnet/skills

migrate-vstest-to-mtp

Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing