Skip to content

An Xcode Plugin to show the state of FBSnapshot Tests.

License

Notifications You must be signed in to change notification settings

sarahscott/Snapshots

 
 

Repository files navigation

Snapshots for Xcode

An Xcode Plugin to show the state of FBSnapshot Tests.

I think Facebook have view testing right. I don't think Xcode's quite there, so I built a plugin to fix it.

Screenshot

Features

  • Showing new images as they're created
  • Showing the differences between failed snapshot tests
  • Open specific diffs in Kaleidoscope
  • Turns red if you've created a view with a zero frame

Installation

Run this:

git clone https://github.com/orta/Snapshots.git
cd Snapshots
xcodebuild

Then restart Xcode.

Soon you can install via Alcatraz. In XCode choose Window, Package Manager and search for "Snapshots". thre's an issue around nibs with Alcatraz which means it won't load.

Contributing

It's actually way easier to work on Plugins than you think. Hitting run in Xcode on this project will open a new Xcode with a working lldb instance and you can work on it like any other app. Contributions are extremely welcome of course, large visual design changes should probably be talked about in an issue first FWIW.

Unknowns

Currently this only works if you're using XCTests or Expecta. Kiwi has it's own test runner, and I've been focusing on what I use personally.

If you're using Expecta I really recommend my buddy dB's extension for Expecta: EXPMatchers+FBSnapshotTest. It automates the whole setup process + adds nice language around tests.

About

An Xcode Plugin to show the state of FBSnapshot Tests.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 94.2%
  • C 3.2%
  • Shell 1.9%
  • Other 0.7%