Skip to content
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

[p5.js 2.0] Add contributor docs for visual tests #7617

Open
1 of 17 tasks
davepagurek opened this issue Mar 11, 2025 · 2 comments
Open
1 of 17 tasks

[p5.js 2.0] Add contributor docs for visual tests #7617

davepagurek opened this issue Mar 11, 2025 · 2 comments

Comments

@davepagurek
Copy link
Contributor

Increasing access

Visual tests have the opportunity to make it easier for contributors to add tests and improve p5's reliability

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

Feature request details

We currently have some very basic contributor docs for visual testing in the unit testing doc: https://github.com/processing/p5.js/blob/main/contributor_docs/unit_testing.md#visual-tests

  • We don't actually have any visuals in the doc! Ideally we would show people what visual tests are doing (e.g. show what the tests are "looking at" and also show what it looks like when tests fail so people know what kind of thing they attempt to protect against)
  • The instructions on the main branch need to be updates for 2.0
  • We need to add some "best practices", e.g.
    • Keep the size of the canvas for each test small, as we resize them under the hood to make it run fast on CI
    • Try not to pack too much into a single screenshot, you can always call screenshot() multiple times per test!
  • Describe what kind of "acceptable" differences we expect between platforms (e.g. if we can, a screenshot from our discussions in the past showing how text can look different on CI)
@davepagurek
Copy link
Contributor Author

@Vaivaswat2244 you've been working a lot on visual tests recently, if you're interested in this or #7618 we'd love to have your help! No pressure of course 🙂

@Vaivaswat2244
Copy link

Sure, would be a pleasure

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

No branches or pull requests

2 participants