Skip to content

Merging keeps the earliest start time - #167

Open
eda-s-claude-bot[bot] wants to merge 1 commit into
devfrom
claude/merging-keeps-the-start-time
Open

Merging keeps the earliest start time#167
eda-s-claude-bot[bot] wants to merge 1 commit into
devfrom
claude/merging-keeps-the-start-time

Conversation

@eda-s-claude-bot

Copy link
Copy Markdown

Bug Fixes

  • pyEDAA.Reports.Unittesting:
    • Merging lost the start time. MergedTestsuiteSummary.Merge() never touched _startTime, so every merged
      report came out without one - the same shape as the hostname before
      #162. A merged entity now starts when the earliest of
      its parts started, and a part without a start time contributes nothing rather than erasing what is known. The
      rule lives on the Merged mixin, so MergedTestsuite and MergedTestsuiteSummary share it.

      Six conversions were affected - Ant-JUnit4, CTest-JUnit and GoogleTest-JUnit into CTest-JUnit and
      GoogleTest-JUnit, whose schemas require timestamp:

      $ pyedaa-reports unittest --merge=Ant-JUnit:TEST-my.AllTests.xml --output=CTest-JUnit:out.xml
      [ERROR]     The CTest + JUnit format requires a timestamp on <testsuite>, but the report has none.
      [FATAL]     Too many errors in previous steps.     # exit code 255
      

      It now exits 0 and writes a schema-valid report.

Unit Tests

  • Four testcases in tests/unit/Unittesting/Hostname.py: one report, the earliest of two, a report without a
    start time next to one with, and neither having one.
  • tests/unit: 157 → 161 passed.

Known Issues

  • This is the merge losing a value it was given. The related question - deriving a summary's start time from its
    children when it never had one, which is what pyTest-JUnitCTest-JUnit would need - is still open and
    still yours: pytest writes timestamp on <testsuite> but not on <testsuites>.

Related Issues and Pull-Requests

  • Found by driving the dialect matrix through the command line rather than the data model. Without this, six cells
    of that matrix fail at application level while passing at unit level.

MergedTestsuiteSummary.Merge() never touched _startTime, so every merged report lost it - the same shape as the
hostname before #162. A merged entity started when the earliest of its parts started, and an entity without a
start time contributes nothing rather than erasing what is known. The rule lives on the Merged mixin, so the
summary and the test suite share it.

Found through the command line: 'pyedaa-reports unittest --merge=Ant-JUnit:... --output=CTest-JUnit:...' failed
with "The CTest + JUnit format requires a timestamp on <testsuite>, but the report has none", although the same
conversion works when the reader hands its document straight to the writer. The merge in between was dropping it.
Six conversions were affected: Ant, CTest and GoogleTest into CTest and GoogleTest.

Co-Authored-By: Patrick Lehmann <Paebbels@gmail.com>
@eda-s-claude-bot
eda-s-claude-bot Bot requested a review from Paebbels as a code owner August 16, 2026 17:53
@Paebbels Paebbels added bug Something isn't working Unit Testing Unit test summaries labels Aug 16, 2026
@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 12.50000% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 31.68%. Comparing base (469beb1) to head (d249f03).

Files with missing lines Patch % Lines
pyEDAA/Reports/Unittesting/__init__.py 12.50% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #167      +/-   ##
==========================================
- Coverage   31.74%   31.68%   -0.07%     
==========================================
  Files           9        9              
  Lines        2498     2506       +8     
  Branches      396      398       +2     
==========================================
+ Hits          793      794       +1     
- Misses       1705     1712       +7     
Flag Coverage Δ
unittests 31.68% <12.50%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

Labels

bug Something isn't working Unit Testing Unit test summaries

Development

Successfully merging this pull request may close these issues.

2 participants