I have a class that converts images and videos to other formats. A number of options are available such as size, scaling mode, background color, etc (think ImageMagick's convert
command). Any ideas for how to test it? The code to exercise all of the options isn't that hard to write, but I'm unsure about how to confirm the results are valid, especially for video.
One idea is to run the resulting file through identify or mediainfo and look to see that the results are what I'm expecting. This wouldn't work for an image that's the right size, etc, but looks completely wrong.
Another idea would be to manually confirm the resulting files once, save those files, and then compare them to the newly converted files each time the test is run. The downside of this is the need to have #inputs x #options
output files, which could get big, especially with video.
Is this a fool's errand or is there a reasonable way to get this done?