Skip to content

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Sep 5, 2025

Adds a document describing our environment variable usage for reference by developers working on Swift Testing.

This document is not an API contract: the set of environment variables Swift Testing uses may change at any time.

Checklist:

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

Adds a document describing our environment variable usage for reference by
developers working on Swift Testing.

This document is not an API contract: the set of environment variables Swift
Testing uses may change at any time.
@grynspan grynspan added this to the Swift 6.x (main) milestone Sep 5, 2025
@grynspan grynspan self-assigned this Sep 5, 2025
@grynspan grynspan added the documentation 📚 Improvements or additions to documentation label Sep 5, 2025

# Environment variables in Swift Testing

This document lists the environment variables that Swift Testing currently uses.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
This document lists the environment variables that Swift Testing currently uses.
This document lists the environment variables that Swift Testing uses.

Copy link
Member

Choose a reason for hiding this comment

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

Using "currently" begs the question of how relevant is the content when the reader is finding it and when the doc was published; I'd recommend dropping it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"uses at the time of this writing" perhaps

Comment on lines +16 to +18
Those environment variables marked with `*` are defined by components outside
Swift Testing. In general, environment variables that Swift Testing defines have
names prefixed with `SWT_`.
Copy link
Contributor

Choose a reason for hiding this comment

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

For these, I wonder if using a footnote for each one containing a link to a relevant website which documents it would be useful? I tried clicking the asterisk thinking it might reveal more information and thought that might be helpful

@stmontgomery
Copy link
Contributor

I just landed #1287 and it added a new env var SWT_EXPERIMENTAL_EVENT_STREAM_FIELDS_ENABLED. Could we add that here before landing?

I imagine we could place it in a new section (with its own table) titled "Event stream" perhaps, and hoist SWT_PRETTY_PRINT_JSON there as well instead of having that be in the "Miscellaneous" section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation 📚 Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants