-
Notifications
You must be signed in to change notification settings - Fork 4
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
compare screenshots during automated testing #22
Comments
I was most interested in being able to determine "whether things changed in a sim", and ideally "what changed visually" to help tracking it down. I was thinking that we'd be able to initialize the sim with a random seed, send it fuzz-like events/frames with another (constant) random seed, and take screenshots at predefined intervals. For each sim, it would be a series of screenshots (and a possible hash value for fast comparison). Currently this behavior is phet-io only, so it would be good to discuss if this can be opened enough to allow this testing. Ideally this could not only run on bayes (where it might have a "visually changed" highlight when detected), but I'd want to run this before/after local changes, so I can know if there is a bug before pushing to master. Note that screenshots are probably very browser/platform/computer-specific. Cross-browser things would be hard to identify (as font sizes may slightly change layout, causing slight visual differences cross-platform). |
These tests would also probably identify any usage of the built-in Math.random() or things that weren't based on seeds, and would presumably ensure that phet-io playback should visually match the original. |
Here's a node library that shows differences between images: https://github.com/uber-archive/image-diff |
8/17/17 dev meeting notes: • add a query parameter to set random seed (see initialize-globals.js line 366) |
… lint global for jshashes-1.0.7 lib. See phetsims/aqua#22
…sim launching like it should, and handling of the postMessageOnReady query parameter. See phetsims/aqua#22
… lint global for jshashes-1.0.7 lib. See phetsims/aqua#22
Moved here from 8/17/17 dev meeting notes, since this will involve considerable brainstorming, design, identification of pitfalls, etc.
The text was updated successfully, but these errors were encountered: