-
-
Couldn't load subscription status.
- Fork 102
pr05 Visual Regression Testing #1: Initial Visual Testing Framework #1261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: visual-testing
Are you sure you want to change the base?
pr05 Visual Regression Testing #1: Initial Visual Testing Framework #1261
Conversation
Updated README to reflect migration to Jetpack Compose and strategy for replacing JEditTextArea with RSyntaxTextArea. Added insights on LSP-based editor research and the need for user feedback on Tweak Mode and autocompletion features.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a few comments related to the Gradle setup. I will look into the behaviour and functionality at another stage
visual-tests/src/main/java/processing/test/visual/BaselineManager.java
Outdated
Show resolved
Hide resolved
|
@Vaivaswat2244 It seems that the running of the tests is orchestrated via the gradle file, when instead, I think it should be orchestrated by JUnit. I'm not sure how the reporting system might work - maybe it needs gradle for that, but for the tests themselves, there should be a way of structuring them so they are simply the tests, any data needed by them, and they you invoke JUnit to run the tests. In our call tomorrow, let's look closer at this. |
|
@Vaivaswat2244 just to make the conversation history clean in this PR, I recommend to respond to each of the issues that @Stefterv raised in his previous review with a short comment of what you implemented, or just "DONE", and then mark the issues as resolved. And when you're ready for Stef to rereview, click on "re-request review". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! I only have a few formatting suggestions: There are changes in the root level gradle files that are actually just formatting - I suggest to revert these files. Also in other places where there are substantial formatting only changes (some lines in ./core/build.gradle.kts) I suggest to revert the formatting changes, so that all the changes are functional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Thank you @Vaivaswat2244
One thing that I think would be useful would be some way to know if there differences between the different platforms, as a warning or something similar
I also noticed that Intellij gives a link to see the differences between the asserts, if you see a chance to make that the two images that would be awesome!
@catilac is it an idea to also move this to a feature branch for now?
| } | ||
|
|
||
| public void settings() { | ||
| size(config.width, config.height); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was running it locally on my Mac and it was running in pixeldensity 2 causing the tests to fail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, so I can try forcing the tests to render at a standard pixel-density, another thought is of saving separate baselines for both the pixel-densities though this might be an issue if we see devices with better renderers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think pixeldensity = 1 fine for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Stefterv, Is this resolved now?
Sure, I'll revert the formatting changes. |
Sure, I think the differences between platforms can be identified, we can compare the running sketch to all the baselines which we'll be storing (linux, mac and win), though this can increase the test time significantly, maybe we can do this periodically, using a cron job or something similar. |
|
great question @Stefterv! @Vaivaswat2244 if this project will require multiple phases or multiple PRs, it could be helpful to create a feature branch for it. If it's all self contained in this, then no problem. And in general, small PRs around certain logical boundaries are nice for digesting changes when it's a large effort. up to you @Stefterv ! |
|
Hey @catilac, Addition to this pr, there should be atleast 3 more prs till the completion. Changing to feature branch or staying in main, I am open to both the options. |
|
@Vaivaswat2244 can you fix the last comment and merge the latest changes from main into your branch? |
|
Hey @Stefterv , I just fixed the last comment, but in order to merge the latest changes from main to my branch, I had to resolve the merge conflicts between the branches. Please take a look and let me know if I've made a git mess... |
Add configuration for dependencyUpdates task to manage non-stable versions.
More details surrounding `JEditTextArea`

Visual Testing Framework for Processing
Summary
This PR introduces a comprehensive visual regression testing framework for Processing, enabling automated detection of visual changes in rendering output across different platforms. This also opens up the scope for further discussions and modifications to the approach.
Implementation Details
Core Components
1. Sketch Runner with Controlled Execution
setup()and onedraw()call2. Test Runner (
VisualTestRunner.java)3. JUnit 5 Integration (
VisualTest.java)assertVisualMatch()helper method4. Image Comparison Algorithm (
ImageComparator.java)Project Structure
Key Features
1. Hierarchical Screenshot Organization
__screenshots__/suite-name/test-name-platform.png2. Test Suite Organization
@Tagannotations for flexible test selection3. Intelligent Pixel Matching
4. Gradle Tasks
Usage Example
Testing Strategy
First Run:
Subsequent Runs:
cc @catilac @Stefterv @mingness @SableRaf