You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed in the p5.sound call on discord on 2026-05-29 there is currently nothing in place to help Tommy or other contributors know that all the p5.sound examples continue to work after they've made a change to the library.
I suggest we add a playwright test suite that drives at least chrome and firefox browsers through - initially - the examples collection published on the web editor and checks that at least no errors appear in the console. Later, more tests could be added if desired.
This test suite would have value even if it were only triggered manually from the command-line on an ad-hoc basis by developers. Setting it up to run as part of CI would be bonus.
(Why playwright? It is used in other p5 projects, it is modern and well supported.)
What about unit tests?
The presence of this suggestion of integration tests doesn't preclude ALSO building a suite of automated unit tests. However, that's not the proposal being made here.
Non-core but related: it might make sense to have the examples (currently in the web editor) also distributed in the p5.sound repo (and making that the source of truth for them). Especially so if we're also going to add a duplicate set of the examples adjusted to work with p5 v2.x and want to keep the two sets otherwise identical.
That'd also allow contributors (and, later, CI) to run the integration tests locally without requiring connection to the web editor. There would still be value to testing the actual published examples on web editor, though, given that's where most users are going to be referencing them from.
(I don't know if there's then a way to publish to a web editor collection from a github repo.)
Maybe relevant: i made an experimental test suite (using the same proposed tech) which checks all the reference example sketches in the p5.js-website: processing/p5.js-website#1279
(Looking at this with @ogbabydiesal so notes below are reflecting dgoing thru this together)
+1 all current examples should be in the repo rather than in the editor collection. They should be in an examples directory with the same structure as what the addon template repo suggests (Tommy's also working on adding them to the p5.js-website Sound examples p5.js-website#1232)
Since version 1 of p5.js will not be maintained long term (though will remain available), all example code should be updated to use v2.0. Since revision of the editor sketches is needed anyway, I don't think publishing from editor collection directly is necessary.
Activity
nbogie commentedon May 29, 2026
Non-core but related: it might make sense to have the examples (currently in the web editor) also distributed in the p5.sound repo (and making that the source of truth for them). Especially so if we're also going to add a duplicate set of the examples adjusted to work with p5 v2.x and want to keep the two sets otherwise identical.
That'd also allow contributors (and, later, CI) to run the integration tests locally without requiring connection to the web editor. There would still be value to testing the actual published examples on web editor, though, given that's where most users are going to be referencing them from.
(I don't know if there's then a way to publish to a web editor collection from a github repo.)
nbogie commentedon May 29, 2026
Maybe relevant: i made an experimental test suite (using the same proposed tech) which checks all the reference example sketches in the p5.js-website: processing/p5.js-website#1279
Further conversation here processing/p5.js-website#1280
ksen0 commentedon Jun 9, 2026
(Looking at this with @ogbabydiesal so notes below are reflecting dgoing thru this together)
examplesdirectory with the same structure as what the addon template repo suggests (Tommy's also working on adding them to the p5.js-website Sound examples p5.js-website#1232)