---
title: "testCaseWillStart(_:)"
framework: xctest
role: symbol
role_heading: Instance Method
path: "xctest/xctestobservation/testcasewillstart(_:)"
---

# testCaseWillStart(_:)

Notifies the observer immediately before a test case begins executing.

## Declaration

```swift
optional func testCaseWillStart(_ testCase: XCTestCase)
```

## Parameters

- `testCase`: The test case that is about to start. Additional information about the test case can be retrieved from the test case’s associated doc://com.apple.xctest/documentation/XCTest/XCTestRun.

## See Also

### Observation Methods

- [testBundleWillStart(_:)](xctest/xctestobservation/testbundlewillstart(_:).md)
- [testSuiteWillStart(_:)](xctest/xctestobservation/testsuitewillstart(_:).md)
- [testCase(_:didRecord:)](xctest/xctestobservation/testcase(_:didrecord:)-4cou6.md)
- [testCase(_:didRecord:)](xctest/xctestobservation/testcase(_:didrecord:)-8k955.md)
- [testCase(_:didFailWithDescription:inFile:atLine:)](xctest/xctestobservation/testcase(_:didfailwithdescription:infile:atline:).md)
- [testCaseDidFinish(_:)](xctest/xctestobservation/testcasedidfinish(_:).md)
- [testSuite(_:didRecord:)](xctest/xctestobservation/testsuite(_:didrecord:)-3rk9k.md)
- [testSuite(_:didRecord:)](xctest/xctestobservation/testsuite(_:didrecord:)-1xjkv.md)
- [testSuite(_:didFailWithDescription:inFile:atLine:)](xctest/xctestobservation/testsuite(_:didfailwithdescription:infile:atline:).md)
- [testSuiteDidFinish(_:)](xctest/xctestobservation/testsuitedidfinish(_:).md)
- [testBundleDidFinish(_:)](xctest/xctestobservation/testbundledidfinish(_:).md)
