Skip to content

[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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

suzannaratcliff
Copy link

This PR adds the draft proposal for Issue Severity in Swift Testing.

@stmontgomery stmontgomery self-requested a review April 17, 2025 22:21
@stmontgomery stmontgomery added workgroup: needs development This proposal needs to be developed further before it can be reviewed TWG Contains topic under the domain of the Testing Workgroup labels Apr 17, 2025
* 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)
Copy link
Contributor

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.

Suggested change
* 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`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Lowercased.)

Suggested change
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 {
Copy link
Contributor

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.

Suggested change
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)

Copy link
Contributor

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/...))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TWG Contains topic under the domain of the Testing Workgroup workgroup: needs development This proposal needs to be developed further before it can be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants