e2e-tests

e2e-tests is a command for Claude Code from Kuadrant/mcp-gateway. It costs 0 tokens per session (656 once invoked), scanned A, original, Apache-2.0.

A command workflow for adding end-to-end tests, which test a system through complete user-level or service-level flows rather than isolated functions.

In plain words
What is it for?
Use it to read the test-case document, add missing tests for an MCP server, organize them by category, clean up test resources, and verify them before running the full suite.
Why use it?
It helps compare planned test cases with existing coverage and avoids missing cases, incorrect tags, or test-only code left enabled.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/kuadrant/mcp-gateway/e2e-tests
Clone the repo
git clone --depth 1 https://github.com/Kuadrant/mcp-gateway

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for e2e-tests

README.md
[![agentmods](https://agentmods.dev/badge/commands/kuadrant/mcp-gateway/e2e-tests.svg)](https://agentmods.dev/commands/kuadrant/mcp-gateway/e2e-tests)
Your own site
<a href="https://agentmods.dev/commands/kuadrant/mcp-gateway/e2e-tests"><img src="https://agentmods.dev/badge/commands/kuadrant/mcp-gateway/e2e-tests.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 656 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00656
Opus 5 $0.00000 $0.00328
Sonnet 5 $0.00000 $0.00131
Haiku 4.5 $0.00000 $0.00066

Measured 5d ago against content hash e6937d0ab20f, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

e2e-tests scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/e2e-tests.md · 70 lines

How it starts

The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Use the test cases file as context: $ARGUMENTS

If no file path was provided above, default to: tests/e2e/test_cases.md

Context

Workflow

  1. Read test_cases.md and compare against existing tests in tests/e2e/happy_path_test.go
  2. Identify missing test cases - skip cases already covered
  3. Look for cases that can be extended without creating entirely new test cases
  4. Check for untagged cases - warn if a test case lacks a tag like [Happy]
  5. Add new tests following patterns below
  6. Run with FIt() to verify the new test passes
  7. Remove FIt() before completing - change back to It() so all tests run in CI

Test Organization

  • [Happy] tagged cases → tests/e2e/happy_path_test.go
  • Other tags (e.g., [Error], [Edge]) → create new file named after the tag (e.g., error_test.go)
  • Prefix test descriptions with the tag: It("[Happy] should do something", func() { ... })

Test Patterns

Resource cleanup (required)

var testResources = []client.Object{}

// In test:
registration := NewMCPServerResourcesWithDefaults("test-name", k8sClient)
testResources = append(testResources, registration.GetObjects()...)
registeredServer := registration.Register(ctx)

// AfterEach handles cleanup via testResources slice

Waiting for conditions

Eventually(func(g Gomega) {
    g.Expect(VerifyMCPServerRegistrationReady(ctx, k8sClient, name, namespace)).To(BeNil())
}, TestTimeoutLong, TestRetryInterval).To(Succeed())

Do NOT use

  • defer for cleanup - use BeforeEach/AfterEach instead
  • Modify existing tests without prompting for permission

Running Tests Locally

# Run specific test with focus
cd tests/e2e && go test -v -tags=e2e -run TestE2E -ginkgo.focus="test description" -timeout 10m

# Or use ginkgo CLI
ginkgo run -v --tags=e2e --focus="test description" tests/e2e/

Read the full file on GitHub · 70 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 70 lines · 0 tokens per session scan A e6937d0ab20f

Subscribe to this mod's changes

e2e-tests is a command published in the GitHub repository Kuadrant/mcp-gateway (98 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 656 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.