Skip to content

API or mechanism to perform an action once before/after running all of the tests in a suite type #36

@stmontgomery

Description

@stmontgomery

Description

We should have an API or mechanism to perform an action once inside a suite type before or after running all of that suite's tests.

Conceptually, this would be similar to XCTest's class-level +setUp and +tearDown APIs, or what some other testing libraries call "BeforeAll" and "AfterAll". However, for a more modern Swift solution, it may be better to use a closure- or scoped access- style API, since that interoperates better with Swift concurrency and allows using @TaskLocal.

rdar://103616215

Expected behavior

No response

Actual behavior

No response

Steps to reproduce

No response

swift-testing version/commit hash

No response

Swift & OS version (output of swift --version && uname -a)

No response

Metadata

Metadata

Labels

enhancementNew feature or requestpublic-apiAffects public APItraitsIssues and PRs related to the trait subsystem or built-in traits

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions