swift-snapshot-testing icon indicating copy to clipboard operation
swift-snapshot-testing copied to clipboard

Diff Image is empty

Open jambudi opened this issue 4 years ago • 12 comments

We implemented successfully snapshot tests for critical scenarios using XCUITests and snapshots. When I run locally using Fastlane or Xcode. it is working fine. Currently, all tests are failing on builds machining We are not able to see any diff change in diff image. I have set a 0.985 match. and I also tested 1 match locally and works fine as well.

Screen Shot 2020-11-03 at 4 43 41 PM
  • Builds machines and local simulators are same (iPhone 11 Pro) iOS 13.3
  • We also override status bars to keep time, network, and batteries. That's keep everything same for all snapshot

jambudi avatar Nov 03 '20 11:11 jambudi

Can you share the images please ?

mackoj avatar Nov 05 '20 13:11 mackoj

Have you tried using https://kaleidoscope.app in order to compare your diffs ? This SnapshotTesting.diffTool = "ksdiff" will simplify using kaleidoscope.app for the diff process.

mackoj avatar Nov 05 '20 13:11 mackoj

Yes, I am using SnapshotTesting.diffTool = "ksdiff" that I am calling from functions. Still failing

jambudi avatar Nov 06 '20 11:11 jambudi

I also check both images on https://online-image-comparison.com and seem valid. I haven't seen any diff

jambudi avatar Nov 06 '20 11:11 jambudi

When I do .wait(for: timeout, on: .image(precision: 0.80)), then only it pass

jambudi avatar Nov 06 '20 12:11 jambudi

@gonzalezreal - Can you please help me ?

jambudi avatar Nov 19 '20 16:11 jambudi

Have you tried to change the output and not use image but something like recursive description for exemple ?

mackoj avatar Nov 19 '20 21:11 mackoj

@jambudi It's not empty actually. You can check this by downloading diff image and using adjust color feature in mac os x preview. 97978643-db64b200-1df3-11eb-8095-a0d88cbafef7

ShurupuS avatar Dec 06 '20 12:12 ShurupuS

@jambudi Were you able to figure out the problem or are you able to provide more info?

stephencelis avatar Aug 16 '21 22:08 stephencelis

@stephencelis No, We were not able to fix it. I reduce the percentage match to 0.85

jambudi avatar Aug 16 '21 22:08 jambudi

I can provide more information. Let me know what exactly you need. @stephencelis

jambudi avatar Aug 16 '21 22:08 jambudi

@ShurupuS big 👍, I am uploading the color settings that worked for me after hitting Auto Levels button: Screen Shot 2021-09-24 at 2 06 21 PM

mstana avatar Sep 24 '21 12:09 mstana