test: run the MCP client against the real API in CI

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

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

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
56/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
csharp, github-actions, sqlite
Lĩnh vực
api, ci-cd, testing

Hướng nghiên cứu

Start by reading CLAUDE.md, the TaskFlow.Api and TaskFlow.Mcp projects, and the existing CI workflow to see how tests are run. The issue names WebApplicationFactory and a temporary SQLite database as the test harness; add coverage for the listed client operations and run the documented one-command check. Done means the acceptance criteria pass, including a CI run on every PR.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

Part of nevridge/TaskFlow#397. Blocked by nevridge/TaskFlow#398. This replaces the earlier options (OpenAPI snapshot, throwaway container, process rule), because the API and client now share a repo.

Problem

ApiModels.cs and TaskFlowApiClient.cs are hand-written, and the tests use hand-written fixtures. They pass against a shape the API no longer has, which is how #238, #310 and #351 drifted unnoticed.

Scope

  • Add a test project that references TaskFlow.Api and TaskFlow.Mcp and hosts the real API in-process with WebApplicationFactory and a temporary SQLite database.
  • TaskFlow has no such harness today. It needs Microsoft.AspNetCore.Mvc.Testing, and Program must be made visible to the tests.
  • Point TaskFlowApiClient at the test server's HttpClient.
  • Exercise create, update, plan, complete, block and unblock, plus reading the journal, through the client.
  • Run it in CI on every PR, with no path filter, so API-only PRs run it too.
  • Keep TaskFlow.Mcp free of any reference to TaskFlow.Api. Only the test project references both.

Acceptance criteria

  1. Re-introducing the DateTime due date makes a test fail.
  2. Renaming or removing a response field the client reads makes a test fail.
  3. The check runs locally with one command, which is documented in CLAUDE.md.
  4. The API coverage threshold is unaffected.
Ngôn ngữ chính
C#
Star
1
Fork
0
Merge trung bình
2 giờ 2 phút
Pull request đã merge (30 ngày)
98

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 nevridge/TaskFlow

Tất cả issue của nevridge/TaskFlow

Issue tương tự

Thêm issue về C#

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.