---
title: timeLimit
framework: testing
role: symbol
role_heading: Instance Property
path: testing/test/timelimit
---

# timeLimit

The maximum amount of time this test’s cases may run for.

## Declaration

```swift
var timeLimit: Duration? { get }
```

## Discussion

Discussion Associate a time limit with tests by using timeLimit(_:). If a test has more than one time limit associated with it, the value of this property is the shortest one. If a test has no time limits associated with it, the value of this property is nil.
