swiftlang / swiftlang/swift-testing
Ability to uniquely identify a parameterized test
@stmontgomery is already working on this.
Since Sep 6, 2024.
- Dominant language
- Swift
- Stars
- 2.2k
- Forks
- 169
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 56
Description
Description
Test is identifiable, which is handy to distinguish between tests and avoid letting "global" state to bleed between tests since they can be bucketed by Test.ID. Unfortunately, this breaks when it comes to parameterized tests, because each parameterized case is the same test and thus has the same identity.
Expected behavior
Ideally, Test.ID would incorporate the SPI-internal Test.Case.ID into its identity, or Test.Case.ID would be publicly accessible.
Actual behavior
Currently there's no way to access a parameterized test case's identity because it's SPI.
Steps to reproduce
No response
swift-testing version/commit hash
2e9df4ffc015cfca29ca9918cefcec5f76d06083
Swift & OS version (output of swift --version && uname -a)
n/a
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.