- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 101
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
          
     Open
      
      
            Vaivaswat2244
  wants to merge
  32
  commits into
  processing:visual-testing
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
Vaivaswat2244:pr05-visualtests
  
      
      
   
  
    
  
  
  
 
  
      
    base: visual-testing
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
  
     Open
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            32 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      2e9db0e
              
                Update README.md
              
              
                Stefterv 9e241c7
              
                added the image comparator which is the pixel matching algorithm
              
              
                Vaivaswat2244 a5ded6a
              
                added build.gradle file
              
              
                Vaivaswat2244 8e7f7d0
              
                added the test runner
              
              
                Vaivaswat2244 2f18f21
              
                added the simple test
              
              
                Vaivaswat2244 c51a8e4
              
                Revise README for Jetpack Compose migration strategy
              
              
                Stefterv 4e7183f
              
                fixing the build issues
              
              
                Vaivaswat2244 5934138
              
                added junit as dependency
              
              
                Vaivaswat2244 c4915dd
              
                removing custom class implementation
              
              
                Vaivaswat2244 d549a18
              
                inclding visual-tests in settings
              
              
                Vaivaswat2244 cac895a
              
                fixed the overlapping cmd
              
              
                Vaivaswat2244 803516f
              
                cleaning
              
              
                Vaivaswat2244 ace6f7b
              
                adding packages
              
              
                Vaivaswat2244 5e7f798
              
                added updated screenshot structure
              
              
                Vaivaswat2244 25a80ce
              
                refactoring
              
              
                Vaivaswat2244 4fcd95b
              
                added tests in suits
              
              
                Vaivaswat2244 f778c99
              
                removed simple test
              
              
                Vaivaswat2244 6224f8c
              
                deleting earlier files
              
              
                Vaivaswat2244 bf21131
              
                updated the core/gradle file
              
              
                Vaivaswat2244 86f8847
              
                added the infrastructure
              
              
                Vaivaswat2244 5a0b5e7
              
                added some tests ported by p5js
              
              
                Vaivaswat2244 fa72d2d
              
                removing test rendering suite and its test file
              
              
                Vaivaswat2244 d435e62
              
                added screenshots
              
              
                Vaivaswat2244 0d91001
              
                config files
              
              
                Vaivaswat2244 66071ac
              
                fixed the pixeldensity to 1
              
              
                Vaivaswat2244 fd72f79
              
                Revert "fixed the pixeldensity to 1"
              
              
                Vaivaswat2244 a342a77
              
                fixed pixeldensity to 1
              
              
                Vaivaswat2244 c080196
              
                Merge branch 'visual-testing' into pr05-visualtests
              
              
                Vaivaswat2244 4c190b3
              
                Configure dependencyUpdates task in build.gradle.kts
              
              
                Vaivaswat2244 60af862
              
                removing rendering gradient screenshot
              
              
                Vaivaswat2244 64c213f
              
                Merge pull request #1012 from processing/textarea-research
              
              
                SableRaf e03c099
              
                Merge branch 'processing:main' into pr05-visualtests
              
              
                Vaivaswat2244 File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
        
          
          Binary file added
          
            BIN
              
                +661 Bytes
              
          
        
  core/test/processing/visual/__screenshots__/shapes-3d/per-vertex-fills-linux.png
  
  
      
      
   
        
      
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
        
          
          Binary file added
          
            BIN
              
                +696 Bytes
              
          
        
  core/test/processing/visual/__screenshots__/shapes-3d/per-vertex-strokes-linux.png
  
  
      
      
   
        
      
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
        
          
          Binary file added
          
            BIN
              
                +134 Bytes
              
          
        
  core/test/processing/visual/__screenshots__/shapes-3d/vertex-coordinates-linux.png
  
  
      
      
   
        
      
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
        
          
          Binary file added
          
            BIN
              
                +722 Bytes
              
          
        
  core/test/processing/visual/__screenshots__/shapes/bezier-curves-linux.png
  
  
      
      
   
        
      
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
        
          
          Binary file added
          
            BIN
              
                +723 Bytes
              
          
        
  core/test/processing/visual/__screenshots__/shapes/closed-curves-linux.png
  
  
      
      
   
        
      
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
        
          
          Binary file added
          
            BIN
              
                +602 Bytes
              
          
        
  core/test/processing/visual/__screenshots__/shapes/closed-polylines-linux.png
  
  
      
      
   
        
      
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
        
          
          Binary file added
          
            BIN
              
                +991 Bytes
              
          
        
  core/test/processing/visual/__screenshots__/shapes/contours-linux.png
  
  
      
      
   
        
      
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
        
          
          Binary file added
          
            BIN
              
                +702 Bytes
              
          
        
  core/test/processing/visual/__screenshots__/shapes/curves-linux.png
  
  
      
      
   
        
      
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
        
          
          Binary file added
          
            BIN
              
                +761 Bytes
              
          
        
  core/test/processing/visual/__screenshots__/shapes/curves-tightness-linux.png
  
  
      
      
   
        
      
      
    
      
      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.
      
    
        
          
          Binary file added
          
            BIN
              
                +254 Bytes
              
          
        
  core/test/processing/visual/__screenshots__/shapes/points-linux.png
  
  
      
      
   
        
      
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
        
          
          Binary file added
          
            BIN
              
                +583 Bytes
              
          
        
  core/test/processing/visual/__screenshots__/shapes/polylines-linux.png
  
  
      
      
   
        
      
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
        
          
          Binary file added
          
            BIN
              
                +405 Bytes
              
          
        
  core/test/processing/visual/__screenshots__/shapes/quad-strips-linux.png
  
  
      
      
   
        
      
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
        
          
          Binary file added
          
            BIN
              
                +579 Bytes
              
          
        
  core/test/processing/visual/__screenshots__/shapes/quadratic-beziers-linux.png
  
  
      
      
   
        
      
      
    
      
      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.
      
    
        
          
          Binary file added
          
            BIN
              
                +222 Bytes
              
          
        
  core/test/processing/visual/__screenshots__/shapes/single-closed-contour-linux.png
  
  
      
      
   
        
      
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
        
          
          Binary file added
          
            BIN
              
                +222 Bytes
              
          
        
  ...test/processing/visual/__screenshots__/shapes/single-unclosed-contour-linux.png
  
  
      
      
   
        
      
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
        
          
          Binary file added
          
            BIN
              
                +968 Bytes
              
          
        
  core/test/processing/visual/__screenshots__/shapes/triangle-fans-linux.png
  
  
      
      
   
        
      
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
        
          
          Binary file added
          
            BIN
              
                +692 Bytes
              
          
        
  core/test/processing/visual/__screenshots__/shapes/triangle-strips-linux.png
  
  
      
      
   
        
      
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
        
          
          Binary file added
          
            BIN
              
                +686 Bytes
              
          
        
  core/test/processing/visual/__screenshots__/shapes/triangles-linux.png
  
  
      
      
   
        
      
      
    
      
      Loading
      
  Sorry, something went wrong. Reload?
      Sorry, we cannot display this file.
      Sorry, this file is invalid so it cannot be displayed.
      
    
  
    
      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
    
  
  
    
              | 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"; | ||
| } | ||
| } | 
      
      Oops, something went wrong.
        
    
  
  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.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.