neolabhq/context-engineering-kit/design-testing-strategy

Claude Code and agent skill by neolabhq/context-engineering-kit

Trust tier 3
  • community
  • ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Source check pending

Checking that the SKILL.md file is still in the repository.

Use before writing any type of tests. Distills 14 industry sources into deterministic decision gates, schemas, and worked test examples.

Install

npx vskill@latest install neolabhq/context-engineering-kit/design-testing-strategy

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as neolabhq/context-engineering-kit/design-testing-strategy.

Design Testing Strategy

A reference manual for designing a fit-for-purpose, fit-for-criticality testing strategy.

This skill is decision-oriented, not philosophical: every gate is deterministic (ON when X / OFF when Y), every schema is enforced (field ordering matters), every example is worked end-to-end.

How To Use This Skill

  1. Read Decision Gates in order (Gate 0 -> Gate 6). Each gate is independent — you may finish with any subset of test types ON.
  2. Apply Strategic Skip Heuristics to remove ON gates that would yield low ROI for this artifact.
  3. For each ON gate, fill the Test Matrix Schema (selected_types entry) — the field order is load-bearing.
  4. List rejected types in rejected_types and deliberate skips in deliberately_skipped.
  5. Produce a Test Cases to Cover markdown bullet list using ISTQB techniques from Case Design Techniques.
  6. Cross-check against the matching Worked Example (A pure function / B HTTP+DB endpoint / C UI component).

Decision Gates

Apply gates in numeric order. Each gate produces an independent boolean (applies: true|false). Gates do NOT veto each other — a single artifact may have unit + integration + contract + property-based all ON.

#TypeON whenOFF whenSource
0Skip AllCriticality is NONE (docs-only, comments, formatting, generated code, config without logic, throwaway prototypes)Anything with branching, computed output, side effects, or user-visible behaviorPragmatic Programmer — "Test ruthlessly and effectively" implies effective skipping when ROI is zero
1UnitCode contains any logic: branches, loops, conditionals, computation, transformation, parsing, validation, formattingPure declarative wiring (DI registration, route table) with no behaviorTest Pyramid (Vocke) base layer + Beck TDD Red-Green-Refactor unit
2IntegrationBoundary crossing: HTTP call, DB query, external SDK, message queue, filesystem I/O, OR collaboration with >=2 distinct collaborators where unit doubles distort behaviorPure function with no I/O and 0-1 stable collaboratorsTesting Trophy (Dodds) — integration is the highest-ROI layer; Google "Follow the User"
3Component or E2EUI surface AND criticality >= MEDIUM-HIGH AND user-facing critical path (signup, checkout, auth, payment, primary CTA)Internal admin-only screens, dev tooling, or non-critical UITest Pyramid top + ISO/IEC/IEEE 29119 risk ranking + Google e2e principles
4ContractPublic API consumed by >=1 distinct clients (mobile + web, multiple internal services, external partners) AND independent deploy cadenceAPI where consumer and provider deploy togetherPact / CDC + Pactflow CDC explainer
5SmokeDeployable surface (web app, API, service) AND a deploy/CI pipeline exists where post-deploy validation is meaningfulLibrary, internal helper, or no deploy pipelineGoogle "What Makes a Good End-to-End Test" — smoke = minimal e2e for deploy gate
6Property-BasedInput domain is large or unbounded (numeric ranges, strings, lists, parsers, serializers, encoders, math) AND invariants are stable (round-trip, idempotency, monotonicity, commutativity) AND criticality >= MEDIUM-HIGHSmall finite input domain, unstable invariants, or LOW criticalityHypothesis / QuickCheck
Gate Application Algorithm
for gate in [Gate 0, Gate 1, ..., Gate 6]:
if gate.ON_condition_met(artifact):
result[gate.type] = applies: true
else:
result[gate.type] = applies: false
if Gate 0 is true:
short-circuit: emit empty selected_types, document criticality=NONE, stop

Criticality Scale (used by Gates 3 and 6):

LevelDefinition
NONEDocs, formatting, generated code, throwaway code, configs without logic
LOWInternal dev tooling, admin-only screens, logging formatters
MEDIUMStandard CRUD, internal APIs with a single team consumer, non-critical UI, helpers and utilities
MEDIUM-HIGHUser-facing UI on critical paths, public APIs with multiple consumers, business workflows
HIGHMoney movement, auth/authz decisions, security-critical validation, data integrity, regulated domains

Test Type Reference

TypeUse whenDo NOT use whenFrameworksTypical dependenciesGoogle Size
unitPure logic, single function/method/class, deterministic inputsCode is just I/O orchestration with no logicvitest, jest, pytest, go test, JUnit, xUnit, RSpecNone (or in-memory fakes)Small
integrationBoundary crossing (DB, HTTP, queue, FS); multiple collaborators where mocking distorts behaviorPure function with no boundaryvitest, jest, pytest, go test, JUnit + Testcontainers, supertest, TestRestTemplateReal Postgres/Redis/Kafka via Testcontainers, in-process HTTP server, real FS in tmpdirMedium (single machine, localhost OK)
componentUI rendering + interaction within a single component, no full app contextBackend-only logic; multi-page user flowReact Testing Library, Vue Test Utils, Angular TestBed, Storybook interaction testsjsdom or happy-dom, mocked network at fetch/axios levelSmall to Medium
e2eFull user path through running app: real browser, real backend, real DBInternal helper, single component, non-critical UIPlaywright, Cypress, SeleniumReal running app + Testcontainers-backed DB or seeded stagingLarge (multi-process, possibly multi-machine)
smokePost-deploy go/no-go: hit / health, key endpoints respond, login worksDetailed correctness; smoke is shallow by designPlaywright (1-3 critical paths), HTTP probe scripts, k6 minimal scenariosReal deployed environmentLarge
contractPublic API consumed by 2+ distinct clients with independent deploy cadenceSingle-consumer internal API; provider and consumer deploy togetherPact, Spring Cloud Contract, OpenAPI schema validatorsPact broker or contract files in repoMedium
property-basedLarge/unbounded input domain with stable invariants (parser, serializer, encoder, math)Small finite input space; unstable invariantsHypothesis (Python), fast-check (TS), QuickCheck (Haskell), jqwik (Java), proptest (Rust)Same as unitSmall
Google Test Size Mapping

Google Test Sizes (Bland) and SWE at Google Ch.11 classify tests by resources (size), independent of scope (paths covered):

SizeProcess modelNetworkFilesystemTime budgetNotes
smallSingle process, single threadNoneNone (in-memory only)< 100msFast, hermetic, parallelizable
mediumSingle machine, multiple processes allowedlocalhost onlytmpdir allowed< 1sTestcontainers fits here
largeMulti-machineExternal network allowedPersistent FS allowed< 15minFull e2e
enormousDistributedWide networkAnywherelongerCluster / chaos

A test's type (unit/integration/e2e) and size (small/medium/large) are orthogonal: a small integration test (Testcontainers Postgres in same process via JDBC) is legitimate.

Playwright vs Cypress (UI e2e)
DimensionPlaywrightCypress
BrowsersChromium, Firefox, WebKitChromium, Firefox, WebKit (limited)
Multi-tab / multi-originYesLimited
ParallelismBuilt-in shardsPaid dashboard or external
Network interceptionRobust route-levelcy.intercept
DefaultChoose Playwright for new projects unless team already standardized on CypressChoose Cypress when team has heavy investment

Case Design Techniques

Use ISTQB Foundation Level black-box techniques to derive what to test inside each chosen test type. References: ISTQB BVA white paper, ASTQB black-box techniques.

1. Equivalence Partitioning (EP)

Divide input domain into partitions where the system is expected to behave the same way; ONE test per partition is sufficient.

Worked example — discount(orderTotal: number) -> number:

PartitionRangeRepresentative test inputExpected
Below threshold0 <= total < 100500% discount
Mid tier100 <= total < 5002505% discount
Top tiertotal >= 500100010% discount
Invalid (negative)total < 0-1throw / error

Four tests cover all partitions. EP alone misses boundaries — combine with BVA.

2. Boundary Value Analysis (BVA)

Bugs cluster at boundaries. For every boundary value B, test `B-1`, `B`, `B+1` (or for floats, the smallest representable step).

Worked example — same discount function, boundary at 100:

Test inputWhyExpected
99 (= B-1)Last value of "below threshold" partition0% discount
100 (= B)First value of "mid tier" partition5% discount
101 (= B+1)Confirms not off-by-two5% discount

Repeat for boundary at 500: test 499, 500, 501. Total: 6 boundary tests + 4 EP tests = 10 cases.

The B-1 / B / B+1 triplet has the same shape across boundaries (vary input, vary expected output, identical assertion); this is a natural fit for a table-driven test (see sub-section 5 below).

3. Decision Tables

When output depends on combinations of conditions. Each column is a rule.

Worked example — canCheckout(cartHasItems, paymentValid, addressOnFile):

Condition / RuleR1R2R3R4
cartHasItemsTTTF
paymentValidTTF*
addressOnFileTF**
Resultallowblock:addressblock:paymentblock:cart

Four tests, one per rule (* = don't care, dropped via merging).

4. State Transition

When behavior depends on history. Identify states, events, and forbidden transitions.

Worked example — Order state machine with states {draft, submitted, paid, shipped, cancelled}:

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
1,234
Repository forks
132
7-day trend score
36

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Extension points

  • hookPre/post lifecycle hooks

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/neolabhq/context-engineering-kit/design-testing-strategy/badge)](https://verified-skill.com/skills/neolabhq/context-engineering-kit/design-testing-strategy)

Something wrong with this skill or its page? Tell us.