SnapshotTesting in practice

SnapshotTesting in practice

SnapshotTesting is a new iOS framework by the authors of PointFree. In this presentation, we'll walk through how to get started and the numerous ways you can use it for testing & more.

4d3a43c77ae784f6966ac7750d3eaeb6?s=128

Alek Åström

January 21, 2019
Tweet

Transcript

  1. None
  2. Hello, I’m @MisterAlek

  3. None
  4. None
  5. SnapshotTesting • Runs as unit tests • Captures snapshot on

    first run • Compares to previous snapshot on subsequent runs
  6. What to snapshot?

  7. Views & ViewControllers • Options for simulating specific devices (⚠)

    • Option for precision (<100% pixels matched)
  8. Encodables

  9. Anything(!)

  10. Demo

  11. Learnings • Super simple to get started • Extensible •

    Enables TDD for views • Eliminates need for fixtures • Same simulator must be used when generating snapshots as on CI • Prepare to get some initial false negatives
  12. Verdict

  13. Thank you!

  14. None