CtrlK
BlogDocsLog inGet started
Tessl Logo

integration-e2e-testing

Integration and E2E test design principles, ROI calculation, test skeleton specification, and review criteria. Use when designing integration tests, E2E tests, or reviewing test quality.

70

Quality

62%

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

SecuritybySnyk

Passed

No known issues

Optimize this skill with Tessl

npx tessl skill review --optimize ./skills/integration-e2e-testing/SKILL.md
SKILL.md
Quality
Evals
Security

Integration and E2E Testing Principles

References

E2E test design with Playwright: See references/e2e-design.md for UI Spec-driven E2E test candidate selection and Playwright test architecture.

Test Type Definition and Limits

Test TypePurposeScopeLimit per FeatureImplementation Timing
IntegrationVerify component interactionsPartial system integrationMAX 3Created alongside implementation
E2EVerify critical user journeysFull systemMAX 1-2Executed in final phase only

Behavior-First Principle

Include (High ROI)

  • Business logic correctness (calculations, state transitions, data transformations)
  • Data integrity and persistence behavior
  • User-visible functionality completeness
  • Error handling behavior (what user sees/experiences)

Exclude (Low ROI in CI/CD)

  • External service real connections → Use contract/interface verification
  • Performance metrics → Non-deterministic, defer to load testing
  • Implementation details → Focus on observable behavior
  • UI layout specifics → Focus on information availability

Principle: Test = User-observable behavior verifiable in isolated CI environment

ROI Calculation

ROI Score = (Business Value × User Frequency + Legal Requirement × 10 + Defect Detection)
            / (Creation Cost + Execution Cost + Maintenance Cost)

Cost Table

Test TypeCreateExecuteMaintainTotal
Unit1113
Integration35311
E2E1020838

Test Skeleton Specification

Required Comment Patterns

Each test MUST include the following annotations:

AC: [Original acceptance criteria text]
Behavior: [Trigger] → [Process] → [Observable Result]
@category: core-functionality | integration | edge-case | e2e
@dependency: none | [component names] | full-system
@complexity: low | medium | high
ROI: [score]

Use the project's comment syntax to wrap these annotations (e.g., // for C-family, # for Python/Ruby/Shell).

Verification Items (Optional)

When verification points need explicit enumeration:

Verification items:
- [Item 1]
- [Item 2]

EARS Format Mapping

EARS KeywordTest TypeGeneration Approach
WhenEvent-drivenTrigger event → verify outcome
WhileState conditionSetup state → verify behavior
If-thenBranch coverageBoth condition paths verified
(none)Basic functionalityDirect invocation → verify result

Test File Naming Convention

  • Integration tests: *.int.test.* or *.integration.test.*
  • E2E tests: *.e2e.test.*

The test runner or framework in the project determines the appropriate file extension.

Review Criteria

Skeleton and Implementation Consistency

CheckFailure Condition
Behavior VerificationNo assertion for "observable result" in skeleton
Verification Item CoverageListed items not all covered by assertions
Mock BoundaryInternal components mocked in integration test

Implementation Quality

CheckFailure Condition
AAA StructureArrange/Act/Assert separation unclear
IndependenceState sharing between tests, order dependency
ReproducibilityDate/random dependency, varying results
ReadabilityTest name doesn't match verification content

Quality Standards

Required

  • Each test verifies one behavior
  • Clear AAA (Arrange-Act-Assert) structure
  • No test interdependencies
  • Deterministic execution

Prohibited

  • Testing implementation details
  • Multiple behaviors per test
  • Shared mutable state
  • Time-dependent assertions without mocking
Repository
shinpr/claude-code-workflows
Last updated
Created

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.