Finally, if you're already using Swift Testing you'll be happy to learn that the framework has been improved to better handle the set up and tear down logic of your tests. Back when Swift Testing was released, Apple's official recommendation to handle such logic was to use the init and the deinit of the type enclosing your tests. This worked, but it didn't felt like the most elegant of solutions, because sharing that logic between several types felt clunky and error prone. Apple must have come to the same conclusion because they've added a Trait mechanism that allows you to define your set up and tear down logic once, and then easily share it across several tests: |