feat(testing): promote visual-regression harness to public API (Track N N1, @since 1.6.9)#126
Merged
Merged
Conversation
…(Track N N1, @SInCE 1.6.9) Move the pixel-level visual-regression harness from the test source set to com.demcha.compose.testing.visual, sibling to the public com.demcha.compose.testing.layout.* snapshot helpers, so library consumers can run the same render-PDF -> diff-PNG baseline gate against their own presets. - PdfVisualRegression + ImageDiff + package-info public (@SInCE 1.6.9) - inline PDFBox PDFRenderer in renderPages(), drop the test-only PdfRenderBridge dependency from the public surface - eager 0..255 guard on perPixelTolerance(int) for fail-fast symmetry with renderScale/mismatchedPixelBudget, plus negative test - rewire 7 in-repo callers to the new package - sync test-your-document.md + CHANGELOG (v1.6.9 Public API) Behavior-preserving: visual baselines unchanged. Full suite 1059/1059 green.
DemchaAV
added a commit
that referenced
this pull request
Jun 3, 2026
…ERTY (Track N N2-N4, @SInCE 1.6.9) (#127) Completes the public visual-regression surface introduced in #126: - expose PdfVisualRegression.APPROVE_PROPERTY (@SInCE 1.6.9) so consumers toggle approve mode without hard-coding the system-property string (mirrors LayoutSnapshotAssertions.UPDATE_PROPERTY) - add docs/operations/visual-regression-testing.md (pixel vs semantic, API, approve mode, cross-platform tolerance calibration) - README 'Which API should I use?' gains a pixel-level visual-regression row - add PublicVisualApiDogfoodTest: composes a document and pixel-tests it end-to-end through the public testing.visual surface Full suite 1060/1060 green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Track N / N1 — public pixel-level visual-regression API (cycle 1.6.9)
Promotes the pixel-level visual-regression harness from the test source set to a public API under
com.demcha.compose.testing.visual, sibling to the existing publiccom.demcha.compose.testing.layout.*snapshot helpers — so library consumers can run the same render-PDF -> diff-PNG baseline gate against their own presets/templates.What changed
PdfVisualRegression+ImageDiff+ newpackage-infotosrc/main/java/...(@since 1.6.9).PDFRenderer, dropping the test-onlyPdfRenderBridgedependency from the public surface (PdfRenderBridgestays in test forGraphComposeDevTool).0..255guard onperPixelTolerance(int)for fail-fast symmetry withrenderScale/mismatchedPixelBudget, plus a negative test (from senior review).docs/operations/test-your-document.md; added a### Public APIentry under## v1.6.9 — Planned.Verification
PublicApiSinceTagCoverage/PublicApiNoEngineLeakguards).PDFRendererper document = PDFBox-recommended usage, identical output).javadoc:javadocgreen; release-profile javadoc jar includes the new package (consistent withtesting.layout).Follow-ups (PR-2 in cycle 1.6.9)
docs/operations/visual-regression-testing.mdPublicVisualApiDogfoodTest(consumer-package dogfood)<subpackages>to includecom.demcha.compose.testing