Recall & Review
beginner
What is snapshot testing in iOS development?
Snapshot testing is a way to check if the visual appearance of a UI component stays the same over time by comparing its current look to a saved image.
Click to reveal answer
beginner
Which framework is commonly used for snapshot testing in Swift?
The iOSSnapshotTestCase framework (also known as FBSnapshotTestCase) is commonly used for snapshot testing in Swift projects.
Click to reveal answer
intermediate
Why is snapshot testing useful compared to manual UI checks?
Snapshot testing automates UI verification, catching visual bugs quickly and consistently without needing a person to look at the screen every time.
Click to reveal answer
intermediate
What should you do if a snapshot test fails because the UI intentionally changed?
You should update the saved snapshot image to the new correct UI appearance to keep tests accurate.
Click to reveal answer
advanced
Name one limitation of snapshot testing.
Snapshot testing can be fragile if small UI changes happen often, and it may not catch functional bugs that don't affect appearance.
Click to reveal answer
What does a snapshot test compare?
✗ Incorrect
Snapshot tests compare the current UI image to a previously saved image to detect visual changes.
Which of these is a popular snapshot testing framework for Swift?
✗ Incorrect
iOSSnapshotTestCase is a popular framework specifically for snapshot testing in Swift.
If a UI change is intentional, what should you do with the snapshot test?
✗ Incorrect
You should update the saved snapshot to reflect the new correct UI.
Snapshot testing is best described as:
✗ Incorrect
Snapshot testing focuses on verifying the UI appearance.
One limitation of snapshot testing is:
✗ Incorrect
Snapshot tests can be fragile and fail often if the UI changes frequently.
Explain how snapshot testing helps maintain UI quality in iOS apps.
Think about how comparing images can catch bugs without manual review.
You got /4 concepts.
Describe the steps to update a snapshot test after a UI change.
Consider what happens when the UI changes on purpose.
You got /4 concepts.