I helped build a system for something at work like this, we use ImageMagick to do this part which has a compair method. This method can have a few different threshold values so images can be a few pixels off which we needed because of anti-alias/floating point differences we were seeing.
If your images are not going to have these issues you can just get the base64 strings directly from the canvas api which is much faster/ simpler. The basic setup is every time you have a clean render export either the base64 or a png with the serialized data that it took to render that image. Then when you run your test just loop over every piece of serialized data, render with the current state of your app and compair the output with the fixtures. On Feb 24, 12:50 pm, Ryan Schmidt <[email protected]> wrote: > I have not gotten into test-driven development yet, and partly it's because I > don't see how to apply it to the (canvas) graphics library I'm currently > working on. Whenever I work on a new feature, I develop a "test" that shows > how the library does not implement the feature; then I implement the feature > until the test works. But determining whether it works relies on a visual > inspection by me in the browser. It seems like I would want an automated way > to run all these tests in several browsers, to ensure that whatever I'm > changing next doesn't break something I had working before. Are any of the > lovely test libraries people are using around here suitable for this? -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
