Skip to content

Preserve testCaseId from on-disk schema as entity.TestResult#testId#3335

Closed
grootstebozewolf wants to merge 3 commits into
allure-framework:mainfrom
grootstebozewolf:fix/preserve-test-case-id-on-import
Closed

Preserve testCaseId from on-disk schema as entity.TestResult#testId#3335
grootstebozewolf wants to merge 3 commits into
allure-framework:mainfrom
grootstebozewolf:fix/preserve-test-case-id-on-import

Conversation

@grootstebozewolf
Copy link
Copy Markdown
Contributor

@grootstebozewolf grootstebozewolf commented May 10, 2026

Context

The on-disk Allure 2 schema (defined in allure-java's io.qameta.allure.model.TestResult) carries testCaseId. Allure 3's reader maps the same field onto its identity slot. Allure 2's Allure2Plugin#convert never reads result.getTestCaseId(), so the value is silently dropped on import even though the entity has a testId field ready for it.

This PR maps testCaseIdtestId during conversion. No new API, no UI change; the field is now reachable to widgets and downstream plugins that expect stable test identity (history, retries, baseline comparison). Tightens v2/v3 parity at zero cost.

Checklist

The on-disk Allure 2 schema (defined in allure-java's
io.qameta.allure.model.TestResult) carries testCaseId. Allure 3's
reader maps the same field onto its identity slot. Allure 2's
Allure2Plugin#convert never reads result.getTestCaseId(), so the
value is silently dropped on import even though the entity has a
testId field ready for it.

Map testCaseId -> testId during conversion. No new API, no UI
change; the field is now reachable to widgets and downstream
plugins that expect stable test identity (history, retries,
baseline comparison).

Adds Allure2PluginTest#shouldPropagateTestCaseIdToTestId and
fixture test-case-id.json. Test fails on main and passes with
this change.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@baev
Copy link
Copy Markdown
Member

baev commented May 11, 2026

there is no point of such change

@grootstebozewolf
Copy link
Copy Markdown
Contributor Author

Closing per reviewer feedback: entity.TestResult#testId has no consumer in this codebase (no getTestId calls anywhere, FE doesn't read it), and stable test identity for history/retries is already carried by historyId, which is mapped on the line above. The PR adds a dead write. Apologies for the noise.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants