I've not been able to get webtest or groovy to do a diff on a remote image vs a local file. Can anyone suggest a probable way to do this?
I've tried using various combinations of code scraps as follows -
<invoke description="Invoking URL" url="http://localhost:8080/t3000/images/logo.jpg"/> <compareToExpected description="Comparing Images" toFile="../../src/web/images/logo.jpg" />

In groovy I've tried various uses of com.jj.javadiff.Diff java.net.URL sun.awt.image.URLImageSource without luck. I'm thinking that I need to somehow download the binary and save it to a local file using streams/printwriters then run the comparison on the local files, but have not been able to find any good reference mateial on bridging from the URL to the saved image file (ie: not text) ... is there a shorthand groovy way to just download a networked binary file from a url to a local filespec?

Incidentally I have to eventually make it work for png files, not jpgs as the images are dynamic, created by cewolf, and supplied as png ie: url = http://localhost:8080/t3000/cewolf;jsessionid=4EE13F8F6EF6FC4914269138E8B0BB43?img=-314416359&amp;width=570&amp;height=500&amp;iehack=.png

I've managed to scrape the url out of the page, and it "invoke"s ok (as shown in the reports), but I don't think the compare knows to treat it as a binary/png for the JavaDiff ... ?

Any tips/tricks/admonitions ?
Thanks
Rob

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to