integration-testing

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

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
当您需要完成以下任务时,请加载本技能:
  • 编写或调试管道测试夹具(
    .log
    /
    .json
    输入文件、
    *-expected.json
    输出文件、配置文件)
  • 设置或调试系统测试(
    _dev/test/system/
    目录、
    _dev/deploy/
    目录、Mock APIs、无命中故障排查)
  • 编写针对故障路径、API错误处理或包升级的脚本测试

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
    )
请勿将本技能作为以下场景的主要指南:
  • 摄入管道处理器的设计与架构(请使用
    ingest-pipelines
    技能)
  • CEL程序开发(请使用
    cel-programs
    技能)
  • elastic-package命令选型与堆栈生命周期管理(请使用
    elastic-package-cli
    技能)

Reference files — load the one that matches your test type

参考文件——加载与测试类型匹配的文件

Test typeLoad whenReference file
Pipeline testsWriting 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 teststxtar failure/error tests, upgrade tests, mock services embedded in txtar
references/script-testing.md
测试类型适用时机参考文件
管道测试编写夹具、配置文件、预期输出,排查管道测试故障
references/pipeline-testing.md
通用系统测试进行任何系统测试工作时均需加载——配置字段、命令、环境清理、故障排查
references/system-testing.md
脚本测试txtar故障/错误测试、升级测试、嵌入txtar的Mock服务
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 typeReference 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.
除通用的
system-testing.md
外,请加载与数据流输入类型匹配的参考文件:
输入类型参考文件
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
当某个集成支持多种输入类型时,请加载通用参考文件以及所有适用的输入类型专属参考文件。
当同一任务涉及多种测试类型时(例如端到端创建新数据流),请加载所有适用的参考文件。

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.
  • references/pipeline-testing.md
    — 目录结构、命名规范、夹具格式、配置选项、预期输出格式与评审、核心工作流、夹具场景覆盖、数据匿名化、故障排查
  • references/system-testing.md
    — 通用系统测试参考:必填目录结构、配置字段、核心命令、环境清理故障排查、
    sample_event.json
    验证、通用调试方法
  • references/system-testing-cel.md
    — CEL Mock API配置、CEL无命中故障排查、变量捕获模式
  • references/system-testing-tcp-udp.md
    — 使用
    elastic/stream
    的TCP/UDP日志发送模式、信号协调、端口对齐
  • references/system-testing-http-endpoint.md
    — 设置
    STREAM_PROTOCOL=webhook
    的Webhook/HTTP端点测试、认证头配置
  • references/system-testing-logfile.md
    — 针对logfile/filestream输入的Alpine容器 +
    SERVICE_LOGS_DIR
    模式
  • references/system-testing-kafka-pubsub.md
    — Kafka broker + 流生产者、Pub/Sub模拟器模式
  • references/system-testing-cloud-skip.md
    — 针对云存储输入(aws-s3、gcs、azure-blob-storage、azure-eventhub)何时及为何跳过系统测试
  • references/script-testing.md
    — txtar格式、环境冒烟测试、系统级框架、Mock服务docker-compose与config.yml、升级测试模式、常见陷阱、完整o365示例
  • references/builder-setup-subagent-guidance.md
    — 非CEL数据流的数据采集配置(docker-compose、示例日志、Agent流模板、系统测试配置、清单变量清理)子代理操作手册。编排器通过在任务提示中传递该文件的路径来调度子代理;子代理将在全新上下文自行读取该文件。请勿将其内容嵌入/粘贴到任务提示中。
  • references/builder-system-test-subagent-guidance.md
    — 管道工作完成后运行
    elastic-package test system --generate
    的子代理操作手册(适用于任何可测试输入)。调度规则同上:编排器传递路径,子代理自行读取文件。