Skip to content

Latest commit

 

History

History
167 lines (140 loc) · 5.65 KB

File metadata and controls

167 lines (140 loc) · 5.65 KB

DDD Model - QA Module

Bilingual Navigation: English (this document) · Versión en Español Required Phase: Phase 4 — Validation (QA) Primary Audience: Architects, QA/SDET, Developers

1. Ubiquitous Language

Strict terminology shared between business and technical domains within this context:

  • Test Cycle: Time-boxed container grouping multiple test executions, generally tied to an Implementation Cycle or Release.
  • Test Execution: The atomic and traceable run of a test case (manual or automated) against a specific feature.
  • Defect (Bug): A flaw identified during execution. Managed as an independent lifecycle to allow external syncing.
  • Test Summary Report: The formal Evolith artifact that consolidates QA cycle metrics to authorize transitioning to Release.

2. Conceptual Maps and Aggregates (Mermaid)

2.0. Visual Legends and Glossary

Symbol/Stereotype Meaning
<<Aggregate Root>> Transactional root entity. Governs the persistence of its internal entities.
<<Value Object>> Immutable object without intrinsic identity. Represents a structural property.
*-- (Solid line) Composition. The child element cannot exist without the parent.
..> (Dotted line) Dependency. The element interacts with or delegates to another component.

2.1. View 1: Business Core (Aggregates and Entities)

classDiagram
    class TestCycle {
        <<Aggregate Root>>
        +UUID id
        +UUID implementationCycleId?
        +String tenantId
        +String targetVersion
        +Date startDate
        +Date endDate
        +Float passRatePercentage
        +CycleStatus status
        +UUID qaLeadId_umsUserId
        +List~UUID~ executionIds
        +List~ExternalReference~ externalRefs
        +startTesting(UUID umsUserId)
        +generateSummaryReport(UUID umsUserId)
        +closeCycle(UUID umsUserId)
    }
    note for TestCycle "In generate mode, implementationCycleId links to an ImplementationCycle. In initiative-only mode, remains null."

    class TestExecution {
        <<Aggregate Root>>
        +UUID id
        +UUID cycleId
        +UUID technicalStoryId?
        +UUID checkpointId?
        +String testCaseCode
        +ExecutionStatus status
        +UUID executorId_umsUserId
        +String executionLogs
        +List~ExternalReference~ externalRefs
        +logResult(ExecutionStatus status, UUID umsUserId)
        +blockExecution(String reason, UUID umsUserId)
    }
    note for TestExecution "In generate mode, technicalStoryId links to TechnicalStory. In initiative-only mode, linked to a checkpoint via checkpointId."

    class Defect {
        <<Aggregate Root>>
        +UUID id
        +UUID testExecutionId
        +UUID linkedStoryId
        +UUID linkedCheckpointId?
        +Severity severity
        +Priority priority
        +DefectStatus status
        +UUID reporterId_umsUserId
        +UUID assigneeId_umsUserId
        +List~String~ labels
        +List~ExternalReference~ externalRefs
        +updateStatus(DefectStatus status, UUID umsUserId)
        +assignTo(UUID umsUserId)
        +syncWithExternal(ExternalReference)
    }
    note for Defect "In initiative-only mode, defects link to checkpoints via linkedCheckpointId."

    class ExternalReference {
        <<Value Object>>
        +ExternalSystem system
        +String externalId
        +String url
        +ReferenceType type
        +String label
        +Date linkedAt
        +Map metadata
    }

    TestCycle "1" --> "0..*" TestExecution : orchestrates
    TestExecution "1" --> "0..*" Defect : detects
    TestCycle "1" *-- "0..*" ExternalReference : mapped to
    TestExecution "1" *-- "0..*" ExternalReference : mapped to
    Defect "1" *-- "0..*" ExternalReference : mapped to
Loading

2.2. View 2: Workflow and Audit Components

classDiagram
    class AuditControl {
        <<Value Object>>
        +String createdBy
        +Date createdAt
    }

    class QualityGate {
        <<Value Object>>
        +String approvedById_umsUserId
        +GateDecision decision
        +Date decidedAt
    }

    class TestCycle {
        <<Aggregate Root>>
    }

    class Defect {
        <<Aggregate Root>>
    }

    TestCycle "1" *-- "1" AuditControl : tracked by
    TestCycle "1" *-- "0..1" QualityGate : governed by
    Defect "1" *-- "1" AuditControl : tracked by
Loading

2.3. View 3: Cross-Cutting Infrastructure (Shells)

classDiagram
    class IntegrationFabric {
        <<Shared Kernel Shell>>
        +syncDefects()
        +ingestTestResults()
    }

    class UMS_SDK {
        <<Cross-Cutting>>
        +RequiresDomainAccess()
    }

    class Defect {
        <<Aggregate Root>>
    }

    class TestExecution {
        <<Aggregate Root>>
    }

    Defect ..> IntegrationFabric : exported to (e.g., Jira/Bugzilla)
    TestExecution ..> IntegrationFabric : hydrated by (e.g., Cypress/JUnit)
    TestCycle ..> UMS_SDK : secured via
Loading

3. Tactical Design

3.1. Independent Aggregate Roots (Anti-Deadlock)

To support massive, asynchronous syncing from external test automation platforms, the module aggressively partitions the domain:

  • Defect: Raised to an independent Aggregate rather than nesting in TestExecution. This guarantees Jira/GitHub webhooks can update bug states without locking optimistic metrics on the TestCycle.

3.2. Secure UMS and ALM Mapping

All actors (QA Leads, Reporters, Assignees) demand an explicit umsUserId identifier to guarantee RBAC enforcement and authorize state mutators (e.g., closeCycle(UUID umsUserId)). Additionally, ExternalReference VO allows tracking direct URLs to external CI logs or ticketing references natively.