New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Report doesn't find color difference #850
Comments
Oh, sorry. There is an unintuitive quirk with zero for that parameter. We are currently re-factoring this section and will fix this in a future release. In the meantime you can just set it to .001 or even smaller. Hope that works! |
The issueAfter some time of debugging, this seems to be the real issue: In
I though that this could be the problem:
Setting Then I start to look at var tolerance = { // between 0 and 255
red: 16,
green: 16,
blue: 16,
alpha: 16,
minBrightness: 16,
maxBrightness: 240
}; If I change this tolerance, then the tests start to fail (as expected). I didn't find a way to set this configuration with backstopjs. ConclusionI would like to help by fixing this problem, and I found two possible solutions:
|
Very much appreciate your interest in helping. I have been looking at this library... https://github.com/mapbox/pixelmatch What do you think? |
Pixelmatch looks awesome. This weekend, I'll be working on this. If we decide to use pixelmatch,
@garris Do you think that this is an issue? |
This algorithm seems really good! I was comparing Pixelmatch and Resemble, and I think that the second is a better choice for us. There's why:
const options = {
output: {
errorColor: {
red: 255,
green: 0,
blue: 255
},
errorType: "movement",
transparency: 0.3,
largeImageThreshold: 1200,
useCrossOrigin: false,
outputDiff: true
},
scaleToSameSize: true,
ignore: "antialiasing"
};
What do you think? |
I Open a PR, there still a lot of work to do. With Resemble, the comparison part looks cleaner. |
Hi, I'm very interested in the status of this PR, any ETA? Thank you |
I think the problem might have a different root. Please have a look at the following image: As you can see, in this case is not just a grey on white kind of subtle difference, but more importantly, the script returns a diff of 0.4 and still do not detect the change while More weird to that, when you click the reference image, which on the preview has a grey tick, it shows the pink tick as we have on the test image! Please let me know if you need further info or test images. Thank you @brendonbarreto for #852 PR (hey it has some conflicts) and @garris for creating backstop! |
I noticed this when I created this issue. If you inspect the image, both the test and the reference points to the test folder. @zigotica If you send me both images, I can test this in my branch, and try to understand better what's going on. @garris Do you intend to merge #852 in a future major release? I thought that |
Good, then that's just another issue, unrelated to the diff we're talking about. Sorry I hadn't looked at the page source.
Great! Let me prepare them. Thank you so much! |
Hey @brendonbarreto here the images: I compared all of them to the one without the tick, with these results: Despite my settings include Thank you again for any help. |
@brendonbaretto
Many apologies! I got very busy at work and didn't see your changes! Please give me some time to rereview-- obviously this is a big changes so we need to make sure it will not disrupt current users. Also, diverged is experimental-- it will not replace conventional diff for some time. Also, @zigotica has a very good point -- we should investigate this! Perhaps all that is broken is the threshold evaluation? |
That's my main suspect, yes, but would need to dig into the code. Probably the threshold is doing something like "if diff x and diff y are smaller than threshold, pass", instead of comparing diff% to the threshold. |
no man, thank you both, again |
I don't really know about the details, and as such I might be wrong, but I'd swear the suspect is
|
@zigotica Can you test your scenario in my branch? I made some changes today.
Or give me you configuration file, so I can test myself. |
Sorry @brendonbarreto I cannot run your script, npm dependencies system is a complete mess (not your fault) :) If I install it in package.json, it would run the global backstopjs. If then I remove the global instance to use the one in my node_modules there's not way the script can run. I'm missing smth, any help appreciated. |
Can't you install backstopjs locally and run it by using |
No because somehow it breaks my |
Sorry @brendonbarreto a bit embarrassed but there's no way I can run the local backstopjs, only the 3.7.0, any step-by-step help would be appreciated. |
OK got it! took me longer than expected, sorry. |
Hey @zigotica, sorry for the delay in answering (got busy at work). I didn't manage to reproduce your issue. Can you somehow share your scenario (config and public url)? |
hi @brendonbarreto sorry for the delay. you mean you cannot reproduce the "false pass" using my images from #850 (comment) ? Not in your branch and not even in master? Weird, then must be something in my side then, but we're not using anything special and it certainly works except for the issue described above. Here's my config for the record:
This is executed from a ES script that creates the scenarios in Thank you again for all. |
For the record, still pretty sure the problem is the threshold evaluation. Been doing quite a lot of small changes, all using |
OK I found the problem @brendonbarreto Not sure how it might happened though. Whatever I set for |
BINGO, sorry all the noise, I was setting the |
Nice @zigotica, happy to hear that you find the issue. |
Just quickly posting a reference to a resolved issue here as it's a bit related. #310 (comment) Gotta run. Thanks! |
In working with Resemble JS on a previous project I discovered that they use an 'ignoreNothing' function when they truly want to catch all diffs. Here's the implementation. Maybe doing something similar here is needed. Thoughts? |
Hi, I have came across this issue. Is it still an ongoing issue now or am I missing some settings? |
I tried using
misMatchThreshold
0 and 0.1. There's a big color difference between this two images.The text was updated successfully, but these errors were encountered: