---
title: "testTag"
description: "Test tag attached to this semantics node.

This can be used to find nodes in testing frameworks:
- In Compose's built-in unit test framework, use with [onNodeWithTag][androidx.compose.ui.test.onNodeWithTag].
- For newer AccessibilityNodeInfo-based integration test frameworks, it can be matched in the extras with key \"androidx.compose.ui.semantics.testTag\"
- For legacy AccessibilityNodeInfo-based integration tests, it's optionally exposed as the resource id if [testTagsAsResourceId] is true (for matching with 'By.res' in UIAutomator)."
type: "property"
---

<div class='type'>Property</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
var SemanticsPropertyReceiver.testTag
```


Test tag attached to this semantics node.

This can be used to find nodes in testing frameworks:
- In Compose's built-in unit test framework, use with `onNodeWithTag`.
- For newer AccessibilityNodeInfo-based integration test frameworks, it can be matched in the extras with key "androidx.compose.ui.semantics.testTag"
- For legacy AccessibilityNodeInfo-based integration tests, it's optionally exposed as the resource id if `testTagsAsResourceId` is true (for matching with 'By.res' in UIAutomator).



