Skip to content

Refactor JUnitReportEngine into focused partial-class files aligned with TrxReportEngine layout#8937

Merged
Evangelink merged 1 commit into
mainfrom
copilot/file-diet-refactor-junitreportengine
Jun 9, 2026
Merged

Refactor JUnitReportEngine into focused partial-class files aligned with TrxReportEngine layout#8937
Evangelink merged 1 commit into
mainfrom
copilot/file-diet-refactor-junitreportengine

Conversation

Copilot AI commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

JUnitReportEngine.cs had grown into a single large unit (~800+ LOC), making navigation and targeted reviews expensive. This PR restructures it into focused partial files, matching the established TrxReportEngine organization while preserving behavior and API shape.

  • Refactor scope

    • Split JUnitReportEngine into concern-specific partial files:
      • JUnitReportEngine.cs (orchestration + retry/write flow entry points)
      • JUnitReportEngine.XmlWriting.cs (JUnit XML serialization)
      • JUnitReportEngine.SuiteBuilding.cs (result → suite/testcase model shaping)
      • JUnitReportEngine.FileNaming.cs (default name/template resolution/sanitization)
      • JUnitReportEngine.Models.cs (internal nested DTOs: SuiteSet, Suite, TestCase)
    • Kept internal sealed visibility and class semantics unchanged.
  • Behavioral invariants preserved

    • No public/internal API changes.
    • No logic changes to:
      • report generation pipeline (GenerateReportAsync / retry behavior),
      • suite aggregation and duplicate testcase disambiguation,
      • XML element/attribute emission order and escaping,
      • filename template resolution and invalid/reserved-name handling.
  • Codebase consistency

    • Naming and file boundaries now mirror the sibling TRX engine pattern, reducing cognitive switching cost across report providers.
// Before: one monolithic file
internal sealed class JUnitReportEngine { /* orchestration + xml + model-building + file naming + models */ }

// After: same type split by concern
internal sealed partial class JUnitReportEngine { /* orchestration */ }
internal sealed partial class JUnitReportEngine { /* xml writing */ }
internal sealed partial class JUnitReportEngine { /* suite building */ }
internal sealed partial class JUnitReportEngine { /* file naming */ }
internal sealed partial class JUnitReportEngine { /* nested models */ }

Copilot AI self-assigned this Jun 8, 2026
Copilot AI review requested due to automatic review settings June 8, 2026 19:41
Copilot AI review requested due to automatic review settings June 8, 2026 19:41
Copilot AI linked an issue Jun 8, 2026 that may be closed by this pull request
7 tasks
Copilot AI changed the title [WIP] Refactor JUnitReportEngine into focused partial-class files Refactor JUnitReportEngine into focused partial-class files aligned with TrxReportEngine layout Jun 8, 2026
Copilot AI requested a review from Evangelink June 8, 2026 19:48
@Evangelink Evangelink marked this pull request as ready for review June 9, 2026 06:52
Copilot AI review requested due to automatic review settings June 9, 2026 06:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

@Evangelink Evangelink merged commit f167619 into main Jun 9, 2026
7 checks passed
@Evangelink Evangelink deleted the copilot/file-diet-refactor-junitreportengine branch June 9, 2026 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[file-diet] Refactor JUnitReportEngine.cs into focused partial-class files

3 participants