Skip to content

Add Integration Tests for API Endpoints #36

Description

@FerdinandSu

Description / 描述

English:
Create integration tests for all API endpoints using WebApplicationFactory:

  • Test all endpoints in LedgerController
  • Test all endpoints in ConfigController
  • Test authentication/authorization flows
  • Test error responses
  • Test with different data scenarios

中文:
使用 WebApplicationFactory 为所有 API 端点创建集成测试:

  • 测试 LedgerController 中的所有端点
  • 测试 ConfigController 中的所有端点
  • 测试身份验证/授权流程
  • 测试错误响应
  • 使用不同的数据场景进行测试

Difficulty / 难度

Medium-Hard / 中等-困难

Estimated Time / 预计时间

8-10 hours

Acceptance Criteria / 验收标准

  • Create test project: tests/WebLedger.IntegrationTests
  • Use WebApplicationFactory for testing
  • Write tests for all API endpoints
  • Mock external dependencies
  • Add authentication tests
  • Integrate with CI/CD pipeline

Before starting, please comment on this issue to let us know you're working on it!
开始前请在此 issue 下评论,让我们知道你正在处理它!

See CONTRIBUTING.md for contribution guidelines.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiAPI relatedtestingTesting related

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions