You should have a set of baseline images that you know the source of. Things
you made in Photoshop using your digital camera, that you can validate the
color space and dimensions of.

I would also collect random images from around the web from various sources
such as a Google Image search, Flickr, Picasa and such. This will give you
the random element that tends to come in from user generated content...

The more random the better, in fact using a random URL generator and
grabbing the first image would be a good idea.

Here are some common things I've seen that CAN break image processing:

   - Wrong color space: ie CMYK
   - Bad formatting in the image exif data
   - embedded color profiles


=]

On Wed, Aug 18, 2010 at 12:46 PM, Pete Freitag <p...@foundeo.com> wrote:

>
> Hi Dominic,
>
> I think when it comes to image files you will want to have some local
> test files, because you can potentially run into issues with the way
> different image editors save files. If you generate all your test
> image files through your test code, then your test environment may not
> represent real world scenario (unless you generate all the images used
> in your system).
>
> --
> Pete Freitag
> http://foundeo.com/ - ColdFusion Consulting & Products
> http://petefreitag.com/ - My Blog
> http://hackmycf.com - Is your ColdFusion Server Secure?
>
>
>
> On Wed, Aug 18, 2010 at 12:00 PM, Dominic Watson
> <watson.domi...@googlemail.com> wrote:
> >
> > I'm writing a small utility to perform some image resizing with
> > options such as 'limitFileSize', 'maintainAspectRatio', etc. and I'd
> > like to write unit tests for this (something I'm new to). How would
> > any of you l33t unit testers go about this? i.e. How would you source
> > the images for the unit test? Have demo files local to the test
> > scripts? Create the test images using cfimage within the test script?
> > Any other ideas?
> >
> > TIA
> >
> > Dominic
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336361
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to