Interpreting bug identifiers
Examine how the testing library interprets bug identifiers provided by developers.
Overview
The testing library supports two distinct ways to identify a bug:
A URL linking to more information about the bug; and
A unique identifier in the bug’s associated bug-tracking system.
A bug may have both an associated URL and an associated unique identifier. It must have at least one or the other in order for the testing library to be able to interpret it correctly.
To create an instance of Bug with a URL, use the bug(_:_:) trait. At compile time, the testing library will validate that the given string can be parsed as a URL according to RFC 3986.
To create an instance of Bug with a bug’s unique identifier, use the bug(_:id:_:) trait. The testing library does not require that a bug’s unique identifier match any particular format, but will interpret unique identifiers starting with "FB" as referring to bugs tracked with the Apple Feedback Assistant. For convenience, you can also directly pass an integer as a bug’s identifier using bug(_:id:_:).
Examples
Trait Function | Inferred Bug-Tracking System |
|---|---|
| None |
| None |
| None |
| |
| |
| Apple Feedback Assistant |