К основному содержанию
скилл CX Codex

integration-testing · elastic — скилл для Claude Code: тесты elastic-package

Скилл для написания и отладки тестов elastic-package: фикстуры пайплайнов, системные тесты с мок-API и script-тесты. Пригодится при работе над интеграциями Elastic.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add elastic/integration-skills --skill integration-testing -a claude-code
Открыть на GitHub

Что делает integration-testing

Скилл включается, когда вы пишете или чините тесты elastic-package. Три направления: фикстуры пайплайнов (входные .log/.json, ожидаемый вывод *-expected.json, конфиги), системные тесты в _dev/test/system/ и _dev/deploy/ с мок-API, а также script-тесты на пути ошибок, обработку ошибок API и обновление пакетов.

Устроено так: основной файл SKILL.md только направляет, а вся конкретика лежит в references/. Для пайплайнов — references/pipeline-testing.md, для системных тестов — references/system-testing.md плюс отдельный файл под тип входа (cel, tcp/udp, http_endpoint, logfile/filestream, kafka/gcp-pubsub, облачные хранилища). Для script-тестов — references/script-testing.md. Если интеграция поддерживает несколько типов входа, грузится общий файл и каждый подходящий.

Есть два файла-инструкции для субагентов: references/builder-setup-subagent-guidance.md и references/builder-system-test-subagent-guidance.md. Оркестратор передаёт субагенту путь к файлу в промпте, а тот читает его сам — вставлять содержимое в промпт не нужно. Скилл не заменяет профильные: проектирование процессоров ingest-пайплайнов, разработку CEL-программ и выбор команд elastic-package он не покрывает.

Какие задачи решает

  • собрать фикстуры пайплайна и сверить вывод с *-expected.json
  • поднять мок-API для системного теста
  • разобраться, почему системный тест даёт 0 hits
  • написать script-тест на путь ошибки или обновление пакета
  • выбрать нужный reference-файл под тип входа data stream

Примеры запросов агенту

  • Помоги написать фикстуры для pipeline-теста этого data stream и проверь ожидаемый вывод
  • Системный тест падает с 0 hits — разберись, что не так с мок-API
  • Нужен script-тест на ошибку API и на обновление пакета, подскажи формат txtar

Как установить integration-testing

1Через Skills CLI (Vercel)

npx skills add elastic/integration-skills --skill integration-testing -a claude-code

2Вручную: положить файлы

~/.claude/skills/integration-testing/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/integration-testing/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о integration-testing

Как установить integration-testing в Claude Code?

Выполните npx skills add elastic/integration-skills --skill integration-testing -a claude-code. После этого файл скилла лежит в ~/.claude/skills/integration-testing/SKILL.md.

Что делает integration-testing?

Помогает писать, запускать и отлаживать тесты elastic-package: фикстуры пайплайнов, системные тесты с мок-API и script-тесты на ошибки и обновления. Под каждый тип теста в скилле есть отдельный reference-файл.

Чем этот скилл не заменяет профильные?

Он не ведёт проектирование ingest-пайплайнов, разработку CEL-программ и выбор команд elastic-package. Для этих задач в наборе есть отдельные скиллы.

Исходный текст

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

Похожие скиллы

Все скиллы по теме «Тесты и QA» →

Сначала — integration-testing от других авторов.

integration-testing aj-geddes Помогает проектировать и писать интеграционные тесты для API, баз данных, очередей сообщений и внешних сервисов. Пригодится при сквозной проверке компонентов системы. CX Codex +1 551установок planning-oracle-to-postgres-migration-integration-testing официальный github Скилл анализирует один .NET-проект и составляет план интеграционных тестов для миграции с Oracle на PostgreSQL. Подойдёт, когда нужно определить, какие обращения к базе проверить. 1 800установок aspire-integration-testing Aaronontheweb Скилл для написания интеграционных тестов приложений .NET Aspire на xUnit: фикстуры, поднятие distributed application, поиск эндпоинтов. CX Codex +1 499установок 132-java-testing-integration-testing Juan Antonio Breña Moral Скилл для ИИ-агента, который наводит порядок в интеграционных тестах Java-сервисов: поднимает WireMock, изолирует заглушки и убирает моки HTTP-клиентов. CX Codex +1 376установок 322-frameworks-spring-boot-testing-integration-tests Juan Antonio Breña Moral Скилл для написания и разбора интеграционных тестов Spring Boot 4.0.x: Testcontainers, срезы персистентности, HTTP-проверки. CX Codex +1 357установок mailpit-integration Aaronontheweb Поднимает Mailpit в .NET Aspire, чтобы письма перехватывались локально, а не уходили реальным адресатам. Пригодится при отладке шаблонов и интеграционных тестах. CX Codex +1 421установок testing codewithmukesh Скилл задаёт стратегию тестирования приложений .NET 10: интеграционные тесты через WebApplicationFactory, реальные базы в Testcontainers, снапшоты Verify. CX Codex +1 2 800установок

Из того же набора10

ingest-pipelines Скилл для проектирования и правки ingest-пайплайнов Elasticsearch: парсинг, ветвления, суб-пайплайны и обработка ошибок. CX Codex +1 517установок research-integration Собирает сведения о продукте или поставщике перед созданием интеграции Elastic. Нужен для проверки API, логов, схем полей и настроек сбора. CX Codex +1 513установок dashboard-review Скилл сравнивает изменения JSON-дашбордов Kibana между ветками и проверяет их по рекомендациям Elastic. Пригодится для ревью PR с дашбордами. CX Codex +1 511установок anonymize-logs Заменяет чувствительные значения в логах заказчика, не трогая структуру и формат строк. Пригодится, когда логи надо передать наружу или закоммитить. CX Codex +1 510установок create-integration Скилл создаёт пакеты интеграций Elastic, настраивает потоки данных и ведёт сборку через CEL, пайплайны и системные тесты. CX Codex +1 509установок elastic-package-cli Ведёт агента по командам elastic-package: формат, линт, сборка артефакта, pipeline- и system-тесты, локальный стек Elastic. CX Codex +1 507установок cel-programs Скилл для работы с CEL и mito в интеграциях, которые собирают данные из API: шаблоны cel.yml.hbs, манифесты, отладка через mock. CX Codex +1 505установок maintain-integration Проверяет и улучшает существующие пакеты Elastic integration: от манифестов и пайплайнов до CEL-программ и ECS-сопоставлений. CX Codex +1 504установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой