<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "XCTest",
  "identifier" : "/documentation/XCTest/XCTestObservation/testCaseWillStart(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "XCTest"
    ],
    "preciseIdentifier" : "c:objc(pl)XCTestObservation(im)testCaseWillStart:"
  },
  "title" : "testCaseWillStart(_:)"
}
-->

# testCaseWillStart(_:)

Notifies the observer immediately before a test case begins executing.

```
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 [`XCTestRun`](/documentation/XCTest/XCTestRun).

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)