dnyoussef/context-cascade/e2e-test

Claude Code and agent skill by dnyoussef/context-cascade

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.

End-to-end testing workflow for validating complete user journeys through web applications using claude-in-chrome MCP. Specializes in test assertions, suite organization, evidence collection, and pass/fail reporting.

Install

npx vskill@latest install dnyoussef/context-cascade/e2e-test

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

SKILL.md

The same SKILL.md was published earlier as dnyoussef/context-cascade/e2e-test.

End-to-End Testing

Kanitsal Cerceve (Evidential Frame Activation)

Kaynak dogrulama modu etkin.

[assert|neutral] Systematic end-to-end testing workflow with assertion framework, evidence collection, and structured reporting [ground:skill-design] [conf:0.95] [state:confirmed]

Overview

End-to-end testing validates complete user journeys through web applications, ensuring that integrated systems work correctly from the user's perspective. This skill builds upon browser-automation but adds formal testing constructs: assertions, test suites, fixtures, and detailed pass/fail reporting.

Philosophy: E2E tests are living documentation of expected user behavior. They must be deterministic, maintainable, and produce actionable failure reports.

Key Differences from browser-automation:

Aspectbrowser-automatione2e-test
Primary GoalComplete workflow tasksValidate expected behavior
OutputTask completionPass/Fail test report
Error HandlingRecover and continueFail fast with evidence
EvidenceOptional screenshotsMandatory assertions + screenshots
OrganizationSingle workflowTest suites with fixtures
CleanupBest effortMandatory teardown

Value Proposition: Transform manual QA checklists into automated, repeatable test suites that catch regressions before users do.

When to Use This Skill

Primary Use Cases:

  • Login/authentication flow validation
  • User registration and onboarding verification
  • Checkout and payment flow testing
  • Form submission with validation rules
  • CRUD operations (Create, Read, Update, Delete)
  • Multi-step wizard completion
  • Cross-page state persistence
  • Visual regression detection

Apply When:

  • Validating critical user journeys before deployment
  • Regression testing after code changes
  • Smoke testing production environments
  • Acceptance criteria verification
  • Visual snapshot comparison needed

Trigger Keywords:

  • "e2e test", "end-to-end test"
  • "validate user flow", "test the journey"
  • "check if login works", "verify checkout"
  • "regression test", "smoke test"
  • "acceptance test"

When NOT to Use This Skill

  • Unit testing (use testing frameworks directly)
  • API testing without UI (use API testing tools)
  • Performance/load testing (use delivery-essential-commands-load-test)
  • Single-action validation (use browser-automation)
  • Non-web applications (mobile, desktop)
  • Static content verification (use visual tools)

Core Principles

Principle 1: Assertion-First Design

Mandate: Every test step MUST have explicit success/failure criteria defined upfront.

Rationale: Tests without assertions are just scripts. Explicit assertions make failures debuggable and intentions clear.

In Practice:

  • Define expected outcomes before execution
  • Use multiple assertion types (DOM, visual, URL, text)
  • Fail immediately on assertion failure
  • Capture evidence at assertion points
Principle 2: Test Suite Organization

Mandate: Group related tests into suites with shared setup/teardown.

Rationale: Test organization reduces duplication, improves maintainability, and enables selective test runs.

In Practice:

  • Suite = collection of related test cases
  • Fixtures = reusable setup/teardown logic
  • Each test case is independent (no cross-test dependencies)
  • Clear naming: suite_feature_scenario
Principle 3: Evidence-Based Verdicts

Mandate: Every test result MUST include visual evidence (screenshots) at assertion points.

Rationale: Screenshots provide ground truth for debugging failures and serve as visual documentation.

In Practice:

  • Screenshot before and after critical actions
  • Capture DOM state at assertion points
  • Store evidence with test results
  • Enable visual comparison for regression detection
Principle 4: Deterministic Execution

Mandate: Tests must produce identical results on identical inputs.

Rationale: Flaky tests erode confidence. Determinism enables reliable CI/CD integration.

In Practice:

  • Explicit waits over implicit timeouts
  • Stable element selection (data-testid preferred)
  • Isolated test data (fixtures create/destroy)
  • Retry logic only for infrastructure issues
Principle 5: Actionable Failure Reports

Mandate: Failed tests MUST produce reports that pinpoint the failure without additional investigation.

Rationale: Time-to-fix correlates with failure report quality. Good reports = faster debugging.

In Practice:

  • Include: step that failed, expected vs actual, screenshot
  • Show assertion context (what was being verified)
  • Provide DOM snapshot at failure point
  • Link to relevant code/documentation

Test Framework Concepts

Test Suite Structure
yaml
test_suite:
name: "Login Flow Tests"
description: "Validate user authentication scenarios"
fixtures:
setup:
- action: "create_test_user"
params: { username: "testuser", password: "Test123!" }
- action: "clear_cookies"
teardown:
- action: "delete_test_user"
params: { username: "testuser" }
test_cases:
- name: "successful_login"
steps: [...]
assertions: [...]
- name: "invalid_password"
steps: [...]
assertions: [...]
- name: "empty_fields"
steps: [...]
assertions: [...]
Assertion Types
TypeSyntaxUse Case
element_existsassert_exists(selector)Verify element present in DOM
element_visibleassert_visible(selector)Verify element is visible
text_equalsassert_text(selector, expected)Exact text match
text_containsassert_contains(selector, substring)Partial text match
url_equalsassert_url(expected_url)Exact URL match
url_containsassert_url_contains(substring)URL contains path
attribute_equalsassert_attr(selector, attr, value)HTML attribute check
element_countassert_count(selector, count)Number of matching elements
visual_matchassert_visual(baseline_image)Screenshot comparison
form_valueassert_value(selector, expected)Form input value
Assertion Implementation
javascript
const ASSERTIONS = {
element_exists: async (context, selector) => {
const elements = await mcp__claude-in-chrome__find({
query: selector,
tabId: context.tabId
});
return {
passed: elements.length > 0,
actual: `Found ${elements.length} elements`,
expected: `At least 1 element matching "${selector}"`
};
},
text_equals: async (context, selector, expected) => {
const page = await mcp__claude-in-chrome__read_page({
tabId: context.tabId
});
const element = findElementBySelector(page, selector);
const actual = element?.text || "";
return {
passed: actual === expected,
actual: actual,
expected: expected
};
},
url_equals: async (context, expected) => {
const page = await mcp__claude-in-chrome__read_page({
tabId: context.tabId
});
const actual = page.url;
return {
passed: actual === expected,
actual: actual,
expected: expected
};
},
visual_match: async (context, baselineId) => {
const screenshot = await mcp__claude-in-chrome__computer({
action: "screenshot",
tabId: context.tabId
});
const similarity = await compareImages(screenshot, baselineId);
return {
passed: similarity >= 0.95,
actual: `${(similarity * 100).toFixed(1)}% match`,
expected: "95% or higher match",
evidence: screenshot.imageId
};
}
};
Test Result Structure
yaml
test_result:
suite: "Login Flow Tests"
test_case: "successful_login"
status: "PASSED" | "FAILED" | "SKIPPED" | "ERROR"
duration_ms: 2340
timestamp: "2026-01-12T14:30:00Z"
steps_executed: 5
steps_passed: 5
steps_failed: 0
assertions:
- name: "login_form_visible"
type: "element_visible"
status: "PASSED"
expected: "Login form visible"
actual: "Login form visible"
screenshot_id: "img_001"
- name: "redirect_to_dashboard"
type: "url_contains"
status: "PASSED"
expected: "URL contains /dashboard"
actual: "https://app.example.com/dashboard"
screenshot_id: "img_002"
evidence:
screenshots: ["img_001", "img_002", "img_003"]
dom_snapshots: ["dom_001", "dom_002"]
console_logs: ["log_001"]
failure_details: null # Populated on failure
Failure Report Structure
yaml
failure_report:
test_case: "checkout_with_discount"
failed_at_step: 4
failure:
assertion: "discount_applied"
type: "text_equals"
expected: "$90.00"
actual: "$100.00"
message: "Discount code not applied to total"
context:
url: "https://shop.example.com/checkout"
step_description: "Verify 10% discount applied after code entry"
preceding_action: "Clicked 'Apply Discount' button"
evidence:
screenshot: "img_failure_001"
dom_snapshot: "dom_failure_001"
console_errors: []
debug_hints:
- "Check if discount code 'SAVE10' is still valid"
- "Verify discount applies to current cart items"
- "Check for JavaScript errors in console"

Main Workflow

Phase 1: Test Planning (via Sequential-Thinking)

Purpose: Decompose user journey into testable steps with explicit assertions.

Process:

  1. Invoke sequential-thinking MCP
  2. Break down user journey into atomic steps
  3. Define assertion for each step
  4. Identify fixture requirements (setup/teardown)
  5. Plan evidence collection points
  6. Define success/failure thresholds

Input Contract:

yaml
inputs:
test_description: string # What user journey to test
success_criteria: string # What defines passing
test_data: object # Fixture data (users, products, etc.)

Output Contract:

yaml
outputs:
test_plan:
suite_name: string
fixtures: { setup: [...], teardown: [...] }
test_cases:
- name: string
steps: [{ action, params, assertion }]
timeout_ms: number
Phase 2: Setup (Fixtures)

Purpose: Establish test prerequisites and browser state.

Process:

  1. Get tab context (tabs_context_mcp)
  2. Create dedicated test tab (tabs_create_mcp)
  3. Execute fixture setup actions
  4. Navigate to starting URL
  5. Take initial screenshot (baseline)
  6. Verify preconditions met

Fixture Types:

TypePurposeExample
dataCreate test dataCreate user, seed products
stateSet browser stateLogin, set cookies
navigationEstablish positionNavigate to starting page
cleanupClear residual stateClear localStorage, cookies
Phase 3: Test Execution

Purpose: Execute test steps with assertion verification at each point.

Process:

For each test_case in suite:
For each step in test_case.steps:
1. Execute action (click, type, navigate)
2. Wait for state transition (explicit wait)
3. Capture evidence (screenshot, DOM)
4. Run assertion
5. If assertion fails:
- Capture failure evidence
- Mark test as FAILED
- Skip remaining steps
- Proceed to teardown
6. If assertion passes:
- Log success
- Continue to next step

Evidence Collection Points:

  • Before first action (initial state)
  • After navigation changes
  • Before and after form submissions
  • At every assertion point
  • On failure (mandatory)
Phase 4: Assertion Verification

Purpose: Validate expected vs actual state at each checkpoint.

Assertion Execution:

javascript
async function executeAssertion(assertion, context) {
const startTime = Date.now();
// Take pre-assertion screenshot
const screenshot = await takeScreenshot(context.tabId);

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
32
Repository forks
6
7-day trend score
17

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 5 Aug 2026, 3 months ago.

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/dnyoussef/context-cascade/e2e-test/badge)](https://verified-skill.com/skills/dnyoussef/context-cascade/e2e-test)

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