test(resources): improve test data quality in resource repository tests #3587

Open
opened 2026-04-05 20:06:28 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: test/backlog/resource-repo-test-data-quality
  • Commit Message: test(resources): improve test data quality in resource repository tests
  • Milestone: (none — backlog, see note below)
  • Parent Epic: #398

Background

Resource repository tests currently use minimal or synthetic test data that does not adequately reflect real-world usage patterns. This reduces confidence in the repository layer's correctness and makes it harder to catch edge cases such as:

  • Resources with deeply nested or complex attribute structures
  • Boundary conditions (empty collections, maximum field lengths, special characters in names/paths)
  • Relationships between resource types (e.g., a database resource referencing a cloud resource)
  • Deferred and virtual resource equivalence scenarios

Per the specification, the Repository pattern is a first-class architectural concern in CleverAgents. The resource model covers physical, virtual, cloud, and database resource types. Test data must exercise the full breadth of these types and their interactions to provide meaningful coverage.

Subtasks

  • Audit existing Behave scenarios in features/ for resource repository tests and catalogue gaps in test data coverage
  • Design a comprehensive test data fixture set covering all resource types (physical, virtual, cloud, database, deferred) as defined in docs/specification.md
  • Implement rich test data fixtures in features/mocks/ (unit tests only) with realistic attribute values, nested structures, and boundary conditions
  • Update existing resource repository Behave scenarios to use the new fixtures
  • Add new Behave scenarios covering edge cases identified during the audit (empty collections, special characters, cross-type relationships, virtual equivalence)
  • Verify all new and updated scenarios pass via nox -e unit_tests
  • Confirm coverage remains >= 97% via nox -e coverage_report

Definition of Done

  • All resource types defined in the specification have corresponding rich test data fixtures in features/mocks/
  • Behave scenarios cover boundary conditions: empty collections, max-length fields, special characters in resource names/paths
  • Cross-type relationship scenarios exist (e.g., database resource referencing a cloud resource)
  • Virtual resource equivalence tracking is exercised by at least one scenario
  • No mocks are used in Robot Framework integration tests (robot/ directory)
  • All nox stages pass
  • Coverage >= 97%

Backlog note: This issue was discovered during autonomous operation
on milestone v3.6.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.


Automated by CleverAgents Bot
Supervisor: Unknown | Agent: ca-new-issue-creator

## Metadata - **Branch**: `test/backlog/resource-repo-test-data-quality` - **Commit Message**: `test(resources): improve test data quality in resource repository tests` - **Milestone**: *(none — backlog, see note below)* - **Parent Epic**: #398 ## Background Resource repository tests currently use minimal or synthetic test data that does not adequately reflect real-world usage patterns. This reduces confidence in the repository layer's correctness and makes it harder to catch edge cases such as: - Resources with deeply nested or complex attribute structures - Boundary conditions (empty collections, maximum field lengths, special characters in names/paths) - Relationships between resource types (e.g., a database resource referencing a cloud resource) - Deferred and virtual resource equivalence scenarios Per the specification, the Repository pattern is a first-class architectural concern in CleverAgents. The resource model covers physical, virtual, cloud, and database resource types. Test data must exercise the full breadth of these types and their interactions to provide meaningful coverage. ## Subtasks - [ ] Audit existing Behave scenarios in `features/` for resource repository tests and catalogue gaps in test data coverage - [ ] Design a comprehensive test data fixture set covering all resource types (physical, virtual, cloud, database, deferred) as defined in `docs/specification.md` - [ ] Implement rich test data fixtures in `features/mocks/` (unit tests only) with realistic attribute values, nested structures, and boundary conditions - [ ] Update existing resource repository Behave scenarios to use the new fixtures - [ ] Add new Behave scenarios covering edge cases identified during the audit (empty collections, special characters, cross-type relationships, virtual equivalence) - [ ] Verify all new and updated scenarios pass via `nox -e unit_tests` - [ ] Confirm coverage remains >= 97% via `nox -e coverage_report` ## Definition of Done - [ ] All resource types defined in the specification have corresponding rich test data fixtures in `features/mocks/` - [ ] Behave scenarios cover boundary conditions: empty collections, max-length fields, special characters in resource names/paths - [ ] Cross-type relationship scenarios exist (e.g., database resource referencing a cloud resource) - [ ] Virtual resource equivalence tracking is exercised by at least one scenario - [ ] No mocks are used in Robot Framework integration tests (`robot/` directory) - [ ] All nox stages pass - [ ] Coverage >= 97% > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.6.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. --- **Automated by CleverAgents Bot** Supervisor: Unknown | Agent: ca-new-issue-creator
freemo added this to the v3.7.0 milestone 2026-04-05 20:16:26 +00:00
freemo removed this from the v3.7.0 milestone 2026-04-06 23:37:55 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks
#398 Epic: Post-MVP Resources
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#3587
No description provided.