Skip to content
David Catmull edited this page Nov 19, 2024 · 1 revision

Goal: to be able to create BDD-style structured tests with a minimal amount of messing with low-level (and not well documented) XCTest APIs

At the moment, there are the following components:

  • A result builder for constructing a test out of Describe, Context, and It elements
  • A function body macro that wraps the body in a Describe element and executes it

This enables structured tests using the normal XCTest approach of functions that start with "test".

There are the following limitations:

  • Function body macros are awkward to work with because errors, test failures, and breakpoints all have to refer to the macro-generated code
  • Logging needs to show which test element a failure occurred in
  • Ideally, test elements should show in Xcode's test navigator for easily running specific elements
Clone this wiki locally