Skip to content
Open
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
2e9db0e
Update README.md
Stefterv Mar 25, 2025
9e241c7
added the image comparator which is the pixel matching algorithm
Vaivaswat2244 Sep 16, 2025
a5ded6a
added build.gradle file
Vaivaswat2244 Sep 16, 2025
8e7f7d0
added the test runner
Vaivaswat2244 Sep 16, 2025
2f18f21
added the simple test
Vaivaswat2244 Sep 16, 2025
c51a8e4
Revise README for Jetpack Compose migration strategy
Stefterv Sep 24, 2025
4e7183f
fixing the build issues
Vaivaswat2244 Oct 6, 2025
5934138
added junit as dependency
Vaivaswat2244 Oct 6, 2025
c4915dd
removing custom class implementation
Vaivaswat2244 Oct 6, 2025
d549a18
inclding visual-tests in settings
Vaivaswat2244 Oct 6, 2025
cac895a
fixed the overlapping cmd
Vaivaswat2244 Oct 6, 2025
803516f
cleaning
Vaivaswat2244 Oct 6, 2025
ace6f7b
adding packages
Vaivaswat2244 Oct 6, 2025
5e7f798
added updated screenshot structure
Vaivaswat2244 Oct 6, 2025
25a80ce
refactoring
Vaivaswat2244 Oct 6, 2025
4fcd95b
added tests in suits
Vaivaswat2244 Oct 6, 2025
f778c99
removed simple test
Vaivaswat2244 Oct 7, 2025
6224f8c
deleting earlier files
Vaivaswat2244 Oct 16, 2025
bf21131
updated the core/gradle file
Vaivaswat2244 Oct 16, 2025
86f8847
added the infrastructure
Vaivaswat2244 Oct 16, 2025
5a0b5e7
added some tests ported by p5js
Vaivaswat2244 Oct 16, 2025
fa72d2d
removing test rendering suite and its test file
Vaivaswat2244 Oct 16, 2025
d435e62
added screenshots
Vaivaswat2244 Oct 16, 2025
0d91001
config files
Vaivaswat2244 Oct 16, 2025
66071ac
fixed the pixeldensity to 1
Vaivaswat2244 Oct 21, 2025
fd72f79
Revert "fixed the pixeldensity to 1"
Vaivaswat2244 Oct 21, 2025
a342a77
fixed pixeldensity to 1
Vaivaswat2244 Oct 21, 2025
c080196
Merge branch 'visual-testing' into pr05-visualtests
Vaivaswat2244 Oct 21, 2025
4c190b3
Configure dependencyUpdates task in build.gradle.kts
Vaivaswat2244 Oct 22, 2025
60af862
removing rendering gradient screenshot
Vaivaswat2244 Oct 23, 2025
64c213f
Merge pull request #1012 from processing/textarea-research
SableRaf Oct 24, 2025
e03c099
Merge branch 'processing:main' into pr05-visualtests
Vaivaswat2244 Oct 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ plugins {

// Set the build directory to not /build to prevent accidental deletion through the clean action
// Can be deleted after the migration to Gradle is complete

layout.buildDirectory = file(".build")
44 changes: 29 additions & 15 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ repositories {
maven { url = uri("https://jogamp.org/deployment/maven") }
}

sourceSets{
main{
java{
sourceSets {
main {
java {
srcDirs("src")
}
resources{
resources {
srcDirs("src")
exclude("**/*.java")
}
}
test{
java{
test {
java {
srcDirs("test")
}
}
Expand All @@ -33,13 +33,31 @@ dependencies {
implementation(libs.gluegen)

testImplementation(libs.junit)
testImplementation(libs.junitJupiter)
testImplementation(libs.junitJupiterParams)
testImplementation(libs.junitPlatformSuite)
testImplementation(libs.assertjCore)
}

mavenPublishing{
// Simple JUnit 5 configuration - let JUnit handle everything
tasks.test {
useJUnitPlatform() // JUnit discovers and runs all tests

// Only configuration, not orchestration
outputs.upToDateWhen { false }
maxParallelForks = 1

testLogging {
events("passed", "skipped", "failed", "started")
showStandardStreams = true
}
}

mavenPublishing {
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
signAllPublications()

pom{
pom {
name.set("Processing Core")
description.set("Processing Core")
url.set("https://processing.org")
Expand All @@ -59,21 +77,17 @@ mavenPublishing{
name.set("Ben Fry")
}
}
scm{
scm {
url.set("https://github.com/processing/processing4")
connection.set("scm:git:git://github.com/processing/processing4.git")
developerConnection.set("scm:git:ssh://[email protected]/processing/processing4.git")
}
}
}


tasks.test {
useJUnit()
}
tasks.withType<Jar> {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
tasks.compileJava{
tasks.compileJava {
options.encoding = "UTF-8"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions core/test/processing/visual/src/core/BaselineManager.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package processing.visual.src.core;

import processing.core.PImage;

import java.util.List;

// Baseline manager for updating reference images
public class BaselineManager {
private VisualTestRunner tester;

public BaselineManager(VisualTestRunner tester) {
this.tester = tester;
}

public void updateBaseline(String testName, ProcessingSketch sketch, TestConfig config) {
System.out.println("Updating baseline for: " + testName);

// Capture new image
SketchRunner runner = new SketchRunner(sketch, config);
runner.run();
PImage newImage = runner.getImage();

// Save as baseline
String baselinePath = "__screenshots__/" +
testName.replaceAll("[^a-zA-Z0-9-_]", "-") +
"-" + detectPlatform() + ".png";
newImage.save(baselinePath);

System.out.println("Baseline updated: " + baselinePath);
}

private String detectPlatform() {
String os = System.getProperty("os.name").toLowerCase();
if (os.contains("mac")) return "darwin";
if (os.contains("win")) return "win32";
return "linux";
}
}
Loading