Skip to content

Xcode Playground to use for TDD with Swift, including support for Quick and Nimble.

Notifications You must be signed in to change notification settings

theextremeprogrammer/TDDTestingPlayground

Repository files navigation

TDD Testing Playground

At the Tokyo iOS Meetup in Nov 2017 someone asked me if there was a way to have a quicker TDD cycle in Xcode and I couldn't provide a good answer. Afterwards someone suggested the idea of using an Xcode playground for this and recommended avoiding UIKit as they felt that this was the cause of much of the instability for Xcode Playgrounds.

Recently I've been experimenting more with using Quick and Nimble and I wanted to be able to TDD using these tools in an Xcode Playground. Getting these working in a Playground was much more complicated than I expected, but thanks to the "Using 3rd party frameworks in Swift Playgrounds" and Writing unit tests in Swift playgrounds blog posts on Medium.com plus referencing the Quick framework itself, I was finally able to get past the XCTest linker error and pull this together. 👍🏼

To get this Playground working locally:

  1. Download or clone the repo
  2. From the command line run $ make bootstrap (This grabs the latest version of Quick and Nimble using Carthage)
  3. Open the TestingFrameworksWrapper.xcodeproj project in Xcode
  4. Build the project (⌘+B)
  5. Click on the TDD Testing playground file
  6. Start TDD'ing!

About

Xcode Playground to use for TDD with Swift, including support for Quick and Nimble.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published