# Rundown: BDD testing framework

**URL:** <https://forums.swift.org/t/rundown-bdd-testing-framework/91256>\
**Category:** Community Showcase\
**Tags:** testing, xctest, swift-testing\
**Created:** [December 1, 2026, 4:27am UTC](https://forums.swift.org/t/rundown-bdd-testing-framework/91256 "2026-12-01T04:27:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Catmull](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/david_catmull/32/1007_2.png) [@David\_Catmull](https://forums.swift.org/u/David_Catmull)\
**Post date:** [December 1, 2026, 4:27am UTC](https://forums.swift.org/t/rundown-bdd-testing-framework/91256/1 "2026-12-01T04:27:45Z")

</div>

I'd like to introduce [Rundown](https://github.com/Uncommon/Rundown), a BDD Swift testing framework patterned after frameworks such as RSpec and Quick, and compatible with both XCTest and Swift Testing. It uses a result builder to build test elements - such as `describe`, `context`, and `it` - into an executable spec, and the builder also enforces proper ordering. For example, putting a `beforeAll` at the end instead of the beginning produces a compile-time error.

Here’s a Swift Testing example, using a typed fixture:

```swift
import RundownSwiftTesting
import Testing

@Suite(.rundownPaths)
struct CartTests: SwiftTestingSuite {
  @Test
  func total() throws {
    try spec("Cart") {
      context("with two items") {
        // Fixture creates a new Cart for each test
        let cart = Fixture { Cart(prices: [19, 23]) }

        it("updates when an item is removed", using: cart) { cart in
          cart.prices.removeLast()
          #expect(cart.total == 19)
        }
        
        it("totals their prices", using: cart) { cart in
          #expect(cart.total == 42)
        }
      }
    }
  }
}

private final class Cart {
  var prices: [Int]
  var total: Int { prices.reduce(0, +) }

  init(prices: [Int]) {
    self.prices = prices
  }
}

```

Tests can be `async`, `@MainActor`, or normal. In Xcode test results, XCTest non-`async` tests show each element as a nested activity.

Writing Rundown tests requires a call to the `spec()` function, and I'm looking into ways to simplify that. One is an experimental `@Spec` macro patterened after `SwiftUI.View`. It works, with the drawback that Xcode doesn't discover the tests to list them in the navigator. It does run the tests if you run the whole target, and the results still show in the log.

The `.rundownPaths` trait seen above is required on non-`async` Swift Testing suites in order for failure messages to include the path, like "Cart, with two items, totals their prices". This isn't required for `async` tests because I was able to take advantage of an `async`-only API to insert the path into the message. I think the [Add Issue Capturing](https://forums.swift.org/t/pitch-add-issue-capturing-test-utility-specific-module-to-swift-testing/90397) proposal may provide a fix for this.

I'd appreciate any feedback on the API and what you think might make this library more useful or easier to adopt. Thanks!

[https://github.com/Uncommon/Rundown](https://github.com/Uncommon/Rundown)
