본문으로 건너뛰기
cccskills
무료GitHub에 공개

e2e-manual

E2E Testing Standards Guide. Use this rule when you need to write or execute E2E tests, including test naming conventions, test workflows, and test behavior templates. This rule should be used for end-to-end integration testing scenarios to ensure test standardization and maintainability. Example: When writing new E2E tests, use this rule to ensure proper test format and workflow compliance.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Kubernetes
설치 방법 보기

포함된 파일(1)

  • SKILL.md2.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

e2e测试指南

测试框架

  • E2E(BDD Godog)

严格执行

  • 禁止改变被测试方法的任何行为
  • 禁止更改engine中已有的测试行为
  • 若需要记录日志,一定要在生成日志之前启动触发器When begin trigger
  • 模板在test/engine/steps.go中注册,请务必使用已经注册的测试行为,不要自己生成,且行为类型一定要对应,例如wait {10} seconds,是Then类型行为,而不是When类型行为,因此一定为Then wait {10} seconds

测试命名规范

  • 每个案例必须使用 @e2e 注解标记测试方法
  • 必须标注环境,@host:表示该测试场景在host环境下运行;@k8s:表示该测试场景在k8s环境下运行;@docker-compose:表示该测试场景在本地启动docker-compose运行。
  • 格式:Test${被测试功能名}${案例简单说明}
  • 示例:TestInputFileWithBlackListDir、TestInputFileWithRegexSingle

测试最佳实践

测试流程

  • 创建测试环境,Given {host} environment,其中host代表构建主机环境,daemonset表示构建k8s环境,docker-compose表示容器环境(只有这个三个值,不要出现其他)
  • 启动iLogtail,Given subcribe data from {sls} with config,订阅器(Subscribe)插件是测试引擎中用于接收数据的组件,sls表示生成输出到logstore。Given {regex_single} local config as below,添加本地配置,启动input插件、processor插件,其中regex_single是配置名称,可根据功能进行构造,此配置中确保含有enable: true,否则配置无法执行。
  • 触发日志生成,启动日志记录When begin trigger,利用现有的框架生成一系列事件,例如When generate {100} regex logs to file {/tmp/loongcollector/regex_single.log}, with interval {100}ms为生成文件日志。
  • 验证日志内容,框架会获取采集到的日志,通过查询语句获取确定日之后,根据Then测试行为进行日志验证。查询语句例如,When query through {* | select * from e2e where call_name = 'tcp_connect' and arguments like '%http://www.baidu.com%'},查询日志call_name为tcp_connect,arguments包含http://www.baidu.com。

测试重点

  • 根据功能要求设计查询语句,以便能够达到测试功能的目的
  • 专注于查询的返回值,确保功能符合预期
  • 保持测试的简洁性和可维护性

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

在进行 Code Review 时,使用这个技能对 LoongCollector 变更进行安全导向、架构一致性优先的深度代码评审。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

alibaba/loongcollector2.2천2026년 10월 16일 업데이트

commit

무료

按 Conventional Commits 规范编写提交信息。在创建 git commit 时使用。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

alibaba/loongcollector2.2천2026년 10월 16일 업데이트

compile

무료

编译 LoongCollector C++ 与 Go 组件。涉及构建、单元测试或镜像时使用。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

alibaba/loongcollector2.2천2026년 10월 16일 업데이트

Design document writing conventions. Use when writing or reviewing technical design documents.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

alibaba/loongcollector2.2천2026년 10월 16일 업데이트

e2e

무료

LoongCollector E2E 测试全流程指南:设计、编写、运行和调试。当需要编写新 E2E 测试、运行现有测试、或排查 E2E 测试失败时使用此 skill。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

alibaba/loongcollector2.2천2026년 10월 16일 업데이트

LoongCollector E2E Testing Framework Development Guide. Use this rule when you need to understand E2E testing framework architecture, develop new test behavior functions, or extend testing capabilities. Contains detailed BDD testing framework usage, test behavior function development and registration workflows, and comprehensive reference of existing testing capabilities. Example: When adding custom test behaviors for new plugins, use this rule to understand how to write and register new test functions. Example: When developing E2E tests, use this rule to understand the e2e framework.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

alibaba/loongcollector2.2천2026년 10월 16일 업데이트

alibaba의 스킬 모두 보기

이 스킬의 문제 신고