<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "XCTest",
  "identifier" : "/documentation/XCTest/XCTActivity/name",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "XCTest"
    ],
    "preciseIdentifier" : "c:objc(pl)XCTActivity(py)name"
  },
  "title" : "name"
}
-->

# name

A human-readable name for the activity.

```
var name: String { get }
```

## Discussion

The activity’s name is used to group the activity within test output in Xcode test reports.

For activities created with the [`XCTContext`](/documentation/XCTest/XCTContext) [`runActivityNamed:block:`](/documentation/XCTest/XCTContext/runActivityNamed:block:) class method, the [`name`](/documentation/XCTest/XCTActivity/name) property will match the `name` parameter passed to the class method.

---

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)