image-sequencer icon indicating copy to clipboard operation
image-sequencer copied to clipboard

Histogram Module test passes even though it is not working

Open root00198 opened this issue 5 years ago • 9 comments

Please describe the problem (or idea)

The test written in test/core/modules/histogram.js passes even though the benchmark and result image produced are different.

According to mee the issue is looks-same module. Somehow it is not returning the correct value. Another question is why are we using the looks-same module when we can directly compare the dataURI?

Runnig only the histogram module test. output

What happened just before the problem occurred? Or what problem could this idea solve?

What did you expect to see that you didn't? The image for benchmark and result should have been same.

Please show us where to look

https://beta.sequencer.publiclab.org

What's your PublicLab.org username?

This can help us diagnose the issue:

Browser, version, and operating system

Many bugs are related to these -- please help us track it down and reproduce what you're seeing!


Thank you!

Your help makes Public Lab better! We deeply appreciate your helping refine and improve this site.

To learn how to write really great issues, which increases the chances they'll be resolved, see:

https://publiclab.org/wiki/developers#Contributing+for+non-coders

root00198 avatar Jan 18 '20 08:01 root00198

@publiclab/is-reviewers @HarshKhandeparkar @jywarren @blurry-x-face....

root00198 avatar Jan 18 '20 16:01 root00198

What happened when you compared the base64 string of two images instead of comparing it with looks-same? Were the tests still passing?

rishabhshuklax avatar Jan 18 '20 16:01 rishabhshuklax

When I directly compared the base64, the test failed as it should.

root00198 avatar Jan 18 '20 16:01 root00198

Didn't you removed looks-same in #1530 or #1497 for the same reason?

rishabhshuklax avatar Jan 18 '20 16:01 rishabhshuklax

I did removed the looks-same module in #1497, but then #1490 came and there were a lot of conflicts, so I recreated a new PR, keeping the looks-same module and working only on the GIF's rather combining couple of problems together.

root00198 avatar Jan 18 '20 16:01 root00198

Have you thought of any alternative to looks-same?

rishabhshuklax avatar Jan 19 '20 01:01 rishabhshuklax

How about pixelmatch, this looks promising! @HarshKhandeparkar?

rishabhshuklax avatar Jan 20 '20 15:01 rishabhshuklax

According to me, this problem can be solved if we directly compare the base64 of the images... But before making changes we need to answer 2 questions... Can same image have two different base64? Can two different images have same base64?

root00198 avatar Jan 20 '20 17:01 root00198

Can we re-try this now that we're on GitHub Actions and not Travis? The whole testing setup was tweaked. Thanks!

jywarren avatar Mar 10 '21 19:03 jywarren