Skip to content

Console output should prefix messages with "Suite" instead of "Test" for suites #184

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

Merged
merged 2 commits into from
Jan 16, 2024

Conversation

stmontgomery
Copy link
Contributor

This changes the console output to prefix messages with the word "Suite" instead of "Test" for events representing suites.

Motivation:

It's helpful to users to distinguish between test functions (aka "tests") and suite types (aka "suites") in the human-readable console output shown while running tests, to clarify the role each item plays.

Modifications:

  • Change logic in Event.HumanReadableOutputRecorder to check for suites and use the appropriate word.
  • Add new test and adjust others.

Result:

Console output now shows "Suite" for suites.

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

Resolves rdar://120962053

@stmontgomery
Copy link
Contributor Author

@swift-ci please test

@@ -142,6 +142,14 @@ extension Event.HumanReadableOutputRecorder {
}
}

extension Test {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd prefer to make this just a function local to the file rather than extension because the extension implies something a bit stronger than just "this is the string this recorder uses" to me.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also "title" seems like the wrong noun, but that's probably a bit too nitpicky.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Open to suggestions but this is just private to the file so I'm not too concerned by the word "title"

Copy link
Contributor

Choose a reason for hiding this comment

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

I got nothin'.

Copy link
Contributor

@grynspan grynspan left a comment

Choose a reason for hiding this comment

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

Nitpick, but otherwise looks good to me.

@stmontgomery
Copy link
Contributor Author

@swift-ci please test

@stmontgomery
Copy link
Contributor Author

There are known issues impacting CI currently so merging based on local testing.

@stmontgomery stmontgomery merged commit 61227db into main Jan 16, 2024
@stmontgomery stmontgomery deleted the human-readable-recorder-suite branch January 16, 2024 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants