Skip to content

Enable comparison between static and interactive images #231

Description

@user27182

Related to #227. That PR adds tests for interactive plots, but these tests are independent of the static plot image they are related to.

The requested feature would enable comparing the interactive plot screenshot directly to the static plot screenshot.

Error is expected to be relatively high, especially with scalar bars since these are vertical by default with vtkjs, so perhaps there should be a mechanism to auto-generate a cropped version of the scene and compare both sets of images (cropped and uncropped). If the uncropped version passes, success! If not, crop both static and interactive, and try again. If it passes, convert the initial failure into a warning but the test still passes. IMO this would be better than simply using a high variance.

Alternatively, we could define test-specific image diffs and store them in cache (e.g. literally subtract im1 - im2). Then, the tests fail only if the difference between the static plot and interactive plot exceed the allowed error when compare to the cached difference image.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions