Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

chatcops test: JUnit reporter and --output

Đang mở
#416 5 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@kachamsiddarth đang làm issue này rồi.

Từ ngày 28/10/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

enhancement good first issue hacktoberfest testing

CI systems (GitLab, Jenkins, Azure, the GitHub test report actions) read JUnit XML. This adds --reporter junit.

How reporters work
Reporters are registered in REPORTERS (packages/cli/src/test/reporters/index.ts:32). A Reporter has onResult(result), called as each test finishes, and onEnd(results, summary), called once with all of them and a RunSummary (mode, judge, cost). reporters/json.ts is the shortest example and reporters/pretty.ts the default. They get a ReporterOutput to write to, which is stdout today.

What to add

  • reporters/junit.ts: one <testsuite> per eval file and one <testcase> per test, with classname the file and name the test name, the time in seconds from the turns' latencyMs, and a <failure> with the failed reasons and the reply for failed tests. Escape XML properly.
  • --output <file> in packages/cli/src/main.ts (next to reporter, around line 136). With one --reporter, write to the file instead of stdout. With several, --reporter junit=evals.xml style is clearer, so support name=file per reporter and make --output the shortcut for a single one. Pick what you think reads best and explain it in the PR.

Acceptance criteria

  • Tests: the XML for passing, failing and errored tests, escaping of <, & and quotes, writing to a file
  • Documented in website/src/content/docs/core/testing.mdx, with a changeset for @chatcops/cli (minor)
  • pnpm test:coverage and pnpm lint pass
Ngôn ngữ chính
TypeScript
Star
13
Fork
7
Merge trung bình
3 giờ 28 phút
Pull request đã merge (30 ngày)
296

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của codercops/chatcops

Tất cả issue của codercops/chatcops

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.