Skip to content

Roadmap: Achieve 80% Test Coverage #2

@joshrotenberg

Description

@joshrotenberg

Overview

Improve test coverage across all crates to ensure reliability and maintainability.

Current Status (Updated: 2025-09-04)

  • redis-cloud: 12/21 handlers tested (~57%)
  • redis-enterprise: 22/29 handlers tested (~76%) with 261 test functions
  • redisctl: CLI integration tests in progress

Progress Since Opening

  • ✅ Enterprise API: Achieved 76% handler coverage
  • ✅ All critical security operations tested (auth, ACLs, users)
  • ✅ Comprehensive wiremock-based testing framework established
  • ✅ CI runs all tests on every PR

Remaining Work

Redis Cloud (Priority - See #12)

Missing test coverage for 9 handlers:

  • api_keys_tests.rs - API key management
  • billing_tests.rs - Billing and invoices
  • sso_tests.rs - SSO/SAML configuration
  • crdb_tests.rs - Active-Active databases
  • fixed_tests.rs - Essentials subscriptions
  • private_service_connect_tests.rs - PSC services
  • transit_gateway_tests.rs - TGW attachments
  • Complete database_tests.rs (currently minimal)
  • Complete subscription_tests.rs (currently minimal)

Redis Enterprise (Enhancement)

  • Add tests for remaining 7 handlers
  • Increase test density for complex operations
  • Add failure scenario tests

CLI Testing

  • Integration tests for command workflows
  • Profile management tests
  • Output format tests (JSON, YAML, Table)
  • Error handling and validation tests

Test Requirements

  • Mock API responses using wiremock
  • Test success and error scenarios
  • Validate request headers and bodies
  • Test retry logic and timeouts
  • Test concurrent operations

Success Criteria

  • 80% overall code coverage
  • 90% coverage for Cloud API handlers
  • 100% coverage for critical security paths
  • All public APIs have test coverage
  • Performance regression tests

Next Steps

  1. Complete Cloud API test files (Complete Redis Cloud API test coverage (9/21 handlers missing tests) #12)
  2. Add CLI integration test suite
  3. Set up code coverage reporting
  4. Add mutation testing for quality

Metadata

Metadata

Assignees

No one assigned

    Labels

    epicParent issue tracking multiple related issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions