integration-testing · elastic — Claude Code skill: elastic-package tests
A skill for writing and debugging elastic-package tests: pipeline fixtures, system tests with mock APIs, and script tests. Useful when you work on Elastic integrations.
npx skills add elastic/integration-skills --skill integration-testing -a claude-codeWhat integration-testing does
The skill loads when you create or fix elastic-package tests. It covers three areas: pipeline fixtures (.log/.json inputs, *-expected.json output, config files), system tests under _dev/test/system/ and _dev/deploy/ with mock APIs, and script tests for failure paths, API error handling and package upgrades.
SKILL.md itself only routes you. The detail sits in references/. Pipeline work points to references/pipeline-testing.md. Any system test starts with references/system-testing.md, then adds a file for the input type: cel, tcp/udp, http_endpoint, logfile/filestream, kafka/gcp-pubsub, or cloud storage. Script tests use references/script-testing.md. When an integration takes several input types, load the generic file plus each matching one.
Two files serve subagents: references/builder-setup-subagent-guidance.md and references/builder-system-test-subagent-guidance.md. The orchestrator passes the path in the task prompt and the subagent reads the file in its own context, so pasting the contents into the prompt is wrong. Processor design for ingest pipelines, CEL program development and picking elastic-package commands are handled by other skills, not this one.
What it helps with
- build pipeline fixtures and check them against
*-expected.json - wire a mock API for a system test
- track down why a system test reports 0 hits
- write a script test for an error path or a package upgrade
- pick the right reference file for a data stream input type
Example prompts for the agent
- Help me write the pipeline test fixtures for this data stream and check the expected output
- My system test fails with 0 hits — figure out what is wrong with the mock API
- I need a script test for an API error and a package upgrade, walk me through the txtar format
How to install integration-testing
1Skills CLI (Vercel)
npx skills add elastic/integration-skills --skill integration-testing -a claude-code2Manually: put the files in place
~/.claude/skills/integration-testing/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/integration-testing/
1Skills CLI (Vercel)
npx skills add elastic/integration-skills --skill integration-testing -a codex2Manually: put the files in place
.agents/skills/integration-testing/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add elastic/integration-skills --skill integration-testing -a cursor2Manually: put the files in place
.cursor/skills/integration-testing/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install elastic/integration-skills integration-testing2Manually: put the files in place
.github/skills/integration-testing/SKILL.md1Skills CLI (Vercel)
npx skills add elastic/integration-skills --skill integration-testing -a gemini-cli2Platform CLI
gemini skills install https://github.com/elastic/integration-skills --path skills/integration-testingManually: put the files in place
.devin/skills/integration-testing/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add elastic/integration-skills --skill integration-testing -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about integration-testing
How do I install integration-testing in Claude Code?
Run npx skills add elastic/integration-skills --skill integration-testing -a claude-code. The skill file then lives at ~/.claude/skills/integration-testing/SKILL.md.
What does integration-testing do?
It guides you through creating, running and debugging elastic-package tests: pipeline fixtures, system tests with mock APIs, and script tests for errors and upgrades. Each test type has its own reference file.
Which tasks does this skill not cover?
Ingest pipeline processor design, CEL program development and broad elastic-package command selection. Those belong to other skills in the set.
Source text
SKILL.md · Apache-2.0
--- name: integration-testing description: "Use when creating, running, or debugging elastic-package tests — pipeline fixture authoring and expected output, system tests with mock API wiring, and script tests for failure paths and upgrades. Load the reference file for the test type you are working on." license: Apache-2.0 metadata: author: elastic version: "1.0" --- # integration-testing ## When to use Load this skill whenever tasks include: - authoring or debugging pipeline test fixtures (`.log`/`.json` inputs, `*-expected.json` output, config files) - setting up or debugging system tests (`_dev/test/system/`, `_dev/deploy/`, mock APIs, 0-hits failures) - writing script tests for failure paths, API error handling, or package upgrades ## When not to use Do not use this skill as the primary guide for: - ingest pipeline processor design and architecture (`ingest-pipelines`) - CEL program development (`cel-programs`) - broad elastic-package command selection and stack lifecycle (`elastic-package-cli`) ## Reference files — load the one that matches your test type | Test type | Load when | Reference file | |-----------|-----------|----------------| | Pipeline tests | Writing fixtures, config files, expected output, debugging pipeline test failures | `references/pipeline-testing.md` | | System tests (generic) | Always load for any system test work — config fields, commands, teardown, debugging | `references/system-testing.md` | | Script tests | txtar failure/error tests, upgrade tests, mock services embedded in txtar | `references/script-testing.md` | ### System test input-specific references In addition to the generic `system-testing.md`, load the reference file matching your data stream's input type: | Input type | Reference file | |------------|----------------| | `cel` | `references/system-testing-cel.md` | | `tcp`, `udp` | `references/system-testing-tcp-udp.md` | | `http_endpoint` | `references/system-testing-http-endpoint.md` | | `logfile`, `filestream` | `references/system-testing-logfile.md` | | `kafka`, `gcp-pubsub` | `references/system-testing-kafka-pubsub.md` | | `aws-s3`, `gcs`, `azure-blob-storage`, `azure-eventhub` | `references/system-testing-cloud-skip.md` | When an integration supports multiple input types, load the generic reference plus each applicable input-type reference. When working across multiple test types in one task (e.g. creating a new data stream end-to-end), load all applicable reference files. ## References - `references/pipeline-testing.md` — directory layout, naming conventions, fixture formats, config options, expected output format and review, core workflow, fixture scenario coverage, data anonymization, troubleshooting - `references/system-testing.md` — generic system test reference: required layout, config fields, core commands, teardown failures, `sample_event.json` verification, general debugging - `references/system-testing-cel.md` — CEL mock API wiring, 0-hits debugging for CEL, variable-capture patterns - `references/system-testing-tcp-udp.md` — TCP/UDP log sender pattern with `elastic/stream`, signal coordination, port alignment - `references/system-testing-http-endpoint.md` — webhook/HTTP endpoint testing with `STREAM_PROTOCOL=webhook`, auth headers - `references/system-testing-logfile.md` — Alpine container + `SERVICE_LOGS_DIR` pattern for logfile/filestream inputs - `references/system-testing-kafka-pubsub.md` — Kafka broker + stream producer, Pub/Sub emulator patterns - `references/system-testing-cloud-skip.md` — when and why to skip system tests for cloud storage inputs (aws-s3, gcs, azure-blob-storage, azure-eventhub) - `references/script-testing.md` — txtar format, env smoke test, system-level skeleton, mock service docker-compose and config.yml, upgrade test pattern, pitfalls, full o365 examples - `references/builder-setup-subagent-guidance.md` — subagent operating manual for wiring data collection (docker-compose, sample logs, agent stream template, system test config, manifest var cleanup) for non-CEL data streams. The orchestrator dispatches subagents by passing this file's **path** in the task prompt; the subagent reads it itself in its own fresh context. Do NOT embed/paste its contents into the task prompt. - `references/builder-system-test-subagent-guidance.md` — subagent operating manual for running `elastic-package test system --generate` after pipeline work completes (any testable input). Same dispatch rule as above: orchestrators pass the path, the subagent reads the file itself.
© elastic · Apache-2.0 · elastic/integration-skills
Similar skills
All skills for Testing and QA →integration-testing by other authors comes first.