Hi, this is a mail I have been meaning to write for quite some time, the 2.4.3 release issues give me enough reason to take the time and dump my toughts on a mail.
GeoTools has quite a big problem, we have the rendering modules (renderer and shapefile-renderer) that have some unit tests, but none of the tests actually checks the output of the rendering operation, making it easy for bugs that do not throw exceptions to sneak in. Some years ago rendering tests were made against simple, manually verified exemplars, that is, generated images that were stored on disk and then compared pixel by pixel against the result of a test render operation. To put it in other words, it was checked that the rendered image was exactly like the one expected. This method was then abandoned for a few reasons, which I don't fully remember, but it was something like: * font rendering was not consistent among platforms, making tests fail for example on linux, if the exemplars were computed on windows * it was probably jdk release dependent as well, a minor change in how antialiasing or (diagonal) line rendering was done and boom, you can say bye bye to the image equality So I started to think of other ways to perform the tests. Here are a few ideas: * mock testing. We do provide the renderer a mock graphics object that exepects only a few calls to be made, with certain values as parameters. Upside: platform independent. Downside: you change the implementation of the renderer, you have to change the expectations as well * relaxed image comparison. We don't pretend the result to be exactly like the exemplar, but just a close match. The problem is, how do you define the distance between the two images, and how do you define the soil that makes the test break? Soo... does anyone has bright ideas on how to handle this? Not having real rendering test is proving to be a major liability. Cheers Andrea ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Geotools-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-devel
