-
Notifications
You must be signed in to change notification settings - Fork 608
Perceptual precision causing differences to be missed in Bitrise CI due to failing CIContext.render() calls #710
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
Comments
I'm pretty sure this is because perceptual precision requires metal and VMs don't support metal. I ran into the same issue on CircleCI. Unfortunately, without metal support all tests using perceptual precision would pass, but that has been fixed in #702. (But it still hasn't been merged and no word from the maintainers... 😞) |
Ah yes, it seems likely the same thing. Interestingly Bitrise did have Metal support, but apparently it was turned off last March and I guess maybe not turned back on again https://bitrise.io/blog/post/run-faster-ios-ui-tests-via-metal-support |
Ran the branch in #702 and got the failure I needed all along
|
Bitrise have confirmed that they currently only support Metal in their M1 environments. |
I think the issue here is recording screenshots in a different environment than where it's being verified from. Ideally you'd record screenshots in CI. |
Describe the bug
When running with perceptual precision < 1 we are observing that comparisons are picking up failures correctly locally, but are passing incorrectly on Bitrise CI.
To Reproduce
Run a snapshot test in Bitrise that is expected to fail with a perceptualPrecision < 1, for example as shown in the following project:
SnapshotIssue.zip
The issue appears to be with the following code (and similar) not updating the averagePixel var. Because it's initialised as zero, the tests pass - see
swift-snapshot-testing/Sources/SnapshotTesting/Snapshotting/UIImage.swift
Line 188 in e408bf9
I'm not familiar with this call and this may be a Bitrise specific issue as they're running in VMs (I have raised a ticket with Bitrise) but I think it should be possible to make the tests fail if this scenario is hit.
Expected behavior
Test should fail
Environment
Additional context
xctestresult for Incorrectly passing run (Bitrise):
Test-SnapshotIssue.xcresult.zip
Logs
xcodebuild_test.log
The text was updated successfully, but these errors were encountered: