---
title: Interpreting bug identifiers
framework: testing
role: article
role_heading: Article
path: testing/bugidentifiers
---

# Interpreting bug identifiers

Examine how the testing library interprets bug identifiers provided by developers.

## Overview

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. note: “Bugs” as described in this document may also be referred to as “issues.” To avoid confusion with the Issue type in the testing library, this document consistently refers to them as “bugs.” 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  |   |   |   |   |   |   |

## See Also

### Annotating tests

- [Adding tags to tests](testing/addingtags.md)
- [Adding comments to tests](testing/addingcomments.md)
- [Associating bugs with tests](testing/associatingbugs.md)
- [Tag()](testing/tag().md)
- [bug(_:_:)](testing/trait/bug(_:_:).md)
- [bug(_:id:_:)](testing/trait/bug(_:id:_:)-10yf5.md)
- [bug(_:id:_:)](testing/trait/bug(_:id:_:)-3vtpl.md)
