Menu

#153 Image comparison

v1.6
closed
None
v1.3
not_relevant
Enhancement_Request
Assertions
3-moderate
2017-10-19
2014-09-29
No

Last week on HMS conference, Mr. Hegemann of FRAPORT suggested to enhance SASUnit with an image comparison feature. With image comparison, the need for manual reoperation could be minimized.

For instance, http://imagemagick.org/script/command-line-options.php#compare could be used.

Related

Tickets: #159
Tickets: #160
Tickets: #161

Discussion

  • Oliver Thieleman

    I would suggest a new generic assertion. Something like assert_external or assert_script, with three arguments.
    The first one consists of the path to the shell/batch file and the other two are the usual "expected value" and "actual value".
    When invoking the script the latter two are passed as arguments. If the script executes without any error, i.e. the return code is 0 (as far as I know this is OS-independent), then the test succeeds otherwise it fails.
    So it's up to the developer of the external script to make sense of what is expected and actually exists, but on the other hand he has a wide range of possibilities to enhance his SASUnit tests with external tools and we the SASUnit developers avoid further dependencies.

     
  • Klaus Landwich

    Klaus Landwich - 2014-11-13
    • Release: other --> v1.3
     
  • Klaus Landwich

    Klaus Landwich - 2015-06-01
    • status: open --> assigned
    • assigned_to: Klaus Landwich
    • Milestone: default --> v2.0
     
  • Klaus Landwich

    Klaus Landwich - 2015-06-29
    • Milestone: v2.0 --> v1.6
     
  • Klaus Landwich

    Klaus Landwich - 2015-08-07
    • status: assigned --> closed
     
  • Klaus Landwich

    Klaus Landwich - 2015-08-07

    Code Review done

     
  • Anonymous

    Anonymous - 2017-10-14

    Hello,
    How do assertImage.cmd or assertImage.sh find the location of imagemagick ?
    Shouldn't it be inserted in the script ?
    Thank you

     
  • Klaus Landwich

    Klaus Landwich - 2017-10-19

    Hi there,

    yes we could have done that. With assertImage.cmd I'm sure that the location of ImageMagick is stored in the environment variable "PATH". It holds all search paths for installed programs.

    The same is true for linux. The variable is also named PATH. The difference ist that under unix you don't have an exectable called ImageMagick. This is the name of the product. It consists of several exectuables. For assertImage we use the executable compare. The vraiable PATH holds the install diretory of comare.

    Regards
    Klaus Landwich

     

    Last edit: Klaus Landwich 2017-10-19

Anonymous
Anonymous

Add attachments
Cancel