-
Notifications
You must be signed in to change notification settings - Fork 2.4k
[DRAFT] [ST-XXXX] Test Issue Severity #2794
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[DRAFT] [ST-XXXX] Test Issue Severity #2794
Conversation
* Authors: [Suzy Ratcliff](https://github.com/suzannaratcliff) | ||
* Review Manager: TBD | ||
* Status: **Pitched** | ||
* Bug: [swiftlang/swift-testing#1075](https://github.com/swiftlang/swift-testing/pull/1075) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this line can be removed, because the same pull request is on the next line.
* Bug: [swiftlang/swift-testing#1075](https://github.com/swiftlang/swift-testing/pull/1075) |
Currently, when an issue arises during a test, the only possible outcome is to mark the test as failed. This presents a challenge for users who want a deeper insight into the events occurring within their tests. By introducing a dedicated mechanism to record issues that do not cause test failure, users can more effectively inspect and diagnose problems at runtime and review results afterward. This enhancement provides greater flexibility and clarity in test reporting, ultimately improving the debugging and analysis process. | ||
|
||
## Proposed solution | ||
We propose introducing a new property on `Issue` in Swift Testing called `Severity`, that represents if an issue is a `warning` or an `error`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Lowercased.)
We propose introducing a new property on `Issue` in Swift Testing called `Severity`, that represents if an issue is a `warning` or an `error`. | |
We propose introducing a new property on `Issue` in Swift Testing called `severity`, that represents if an issue is a `warning` or an `error`. |
The `Severity` enum: | ||
|
||
```swift | ||
public enum Severity: Sendable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the other conformances be included? Also, it wasn't obvious that Issue.Severity
is a nested type.
public enum Severity: Sendable { | |
extension Issue { | |
public enum Severity: Codable, Comparable, CustomStringConvertible, Sendable { |
* Status: **Pitched** | ||
* Bug: [swiftlang/swift-testing#1075](https://github.com/swiftlang/swift-testing/pull/1075) | ||
* Implementation: [swiftlang/swift-testing#1075](https://github.com/swiftlang/swift-testing/pull/1075) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you fill out the "Review" header field starting with a link to the Pitch thread on the Forums
* Review: ([pitch](https://forums.swift.org/...))
This PR adds the draft proposal for
Issue
Severity
in Swift Testing.