Menu

#57 Resource based images for assertImage

open
nobody
None
5
2005-01-20
2005-01-20
Anonymous
No

This is somewhat related to, but really independent
from, patch 1100966 (Resource based Scripts).

This patch creates a new method, assertResourceImage(),
in ComponentTester. This method wraps assertImage() by
retrieving an image as a resource of a given name, and
storing it to a temporary file, and then invoking
assertImage().

This allows scripts to reference image data contained
in resources (which is useful even in the absence of
1100966).

Typical usage would be to capture the image using
Costello as normal, and verify the test is working
there. Then, once the reference image had been placed
somewhere appropriate in the resource hierarchy, the
tester would manually edit the script xml. A sample
replacement might look like this:

Original script statement:
<assert args="JComponent Instance,
foo-test.xml-JComponent Instance.jpg,true"
class="abbot.tester.ComponentTester"
method="assertImage" />

Modified script statement:
<assert args="JComponent Instance,
/com/foo/baz/foo-test.xml-JComponent Instance.jpg,true"
class="abbot.tester.ComponentTester"
method="assertResourceImage" />

Discussion

  • Nobody/Anonymous

    patch_assert_resource_image_for_abbot_v0_13_1.txt

     
  • Nobody/Anonymous

    Logged In: NO

    forgot to add, arth3d can be contacted at ponymail dot com
    --Art Hampton