---
title: Test
framework: testing
role: symbol
role_heading: Structure
path: testing/test
---

# Test

A type representing a test or suite.

## Declaration

```swift
struct Test
```

## Overview

Overview An instance of this type may represent: A type containing zero or more tests (i.e. a test suite); An individual test function (possibly contained within a type); or A test function parameterized over one or more sequences of inputs. Two instances of this type are considered to be equal if the values of their Test/id-swift.property properties are equal.

## Topics

### Structures

- [Test.Case](testing/test/case.md)

### Instance Properties

- [associatedBugs](testing/test/associatedbugs.md)
- [comments](testing/test/comments.md)
- [displayName](testing/test/displayname.md)
- [isParameterized](testing/test/isparameterized.md)
- [isSuite](testing/test/issuite.md)
- [name](testing/test/name.md)
- [sourceLocation](testing/test/sourcelocation.md)
- [tags](testing/test/tags.md)
- [timeLimit](testing/test/timelimit.md)
- [traits](testing/test/traits.md)

### Type Properties

- [current](testing/test/current.md)

### Type Methods

- [cancel(_:sourceLocation:)](testing/test/cancel(_:sourcelocation:).md)

## Relationships

### Conforms To

- [Copyable](swift/copyable.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Hashable](swift/hashable.md)
- [Identifiable](swift/identifiable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Essentials

- [Defining test functions](testing/definingtests.md)
- [Organizing test functions with suite types](testing/organizingtests.md)
- [Migrating a test from XCTest](testing/migratingfromxctest.md)
- [Test(_:_:)](testing/test(_:_:).md)
- [Suite(_:_:)](testing/suite(_:_:).md)
