Swiftpack.co - Package - danwaltin/SwiftSpec


A Swift package for BDD/Specification by example à la Gherkin.

Table of Contents

  1. Setup
  2. Usage


This section describes setup for using SwiftSpec in an XCode 8 project.

  1. Download
  2. Compile
  3. Use in the XCode project


Download SwiftSpec, eihter by cloning the repository or by downloading a specific release.


Compile and archive the framework, either from the SwiftSpec.xcodeproj project, or from command line using

xcodebuild -scheme SwiftSpec archive

Build the command line tool, which is used to generate XCTest files from .feature files, using

swift build

Use in the XCode project

Export the archived framework, SwiftSpec.framework, which is available in the XCode organizer.

In the test target of your project

  1. add a build phase Link Binary With Frameworks, and add the SwiftSpec.framework
  2. add a build phase Copy Files, with destination Frameworks, and add the SwiftSpec.framework


  1. Write feature files
  2. Generate XCTest test files using the SwiftSpec command line tool, found under .build/debug/SwiftSpecConsole
  3. Add the test files to the XCode project
  4. Write bindings
  5. Implement the code


Stars: 1
Help us keep the lights on


Used By

Total: 0