0

We have automated tests that simulate user interaction, take snapshots and compare those to previously recorded reference images. Tests that include PDF rendering (via Apple’s PDFKit) are slightly blurry on our machines but crisp on CircleCI. This leads to test failures like these (reference, circle, diff, in that order):

reference: reference

circle output: circle

diff: diff

What we’ve tried:

  • The snapshotting library we use lets us pass a tolerance (both overall and per-pixel). We’ve cranked these values up but we’d like to not go any higher so that we don’t miss real failures when they occur.
  • We’ve tried all three of PDFView’s interpolationQuality settings: none, low and high but those didn’t seem to have an effect. The rendering is still slightly blurry on our machines.

We think that the only solution is to use PDFs that aren’t so text heavy. Any other ideas? BTW we are using a slightly modified version of this snapshotting library.

Justin Garcia
  • 328
  • 1
  • 11
  • I'm not familiar with the execution environment on CircleCI, but my guess is that your local runs and the CircleCI runs are running on different simulators, specifically ones with different screen scales (3x vs 2x). – idz Oct 21 '20 at 18:53
  • we’re running the tests on iPhone 11 sims running iOS 13.7 both locally and on circle. circle is using macOS 10.15.4 whereas our machines are running 10.15.7 though – Justin Garcia Oct 21 '20 at 19:21
  • Perhaps that's it? The different macOS versions? Another thing to look at would be the simulator and Xcode versions. – idz Oct 21 '20 at 19:27
  • Could be. We don’t have anyone running the older version of macOS that circle uses that could check though. Both our machines and circle are using Xcode 11.7 and iOS 13.7 simulators. The problem might be that the machines that circle uses have different GPUs than our laptops – Justin Garcia Oct 21 '20 at 21:46

0 Answers0