# TestThreads The `` element is a container for `` elements. The following attributes are available for `` elements: | Element/Attribute | Required/Optional | Description | | ----------------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | id | | Integer ID of the test thread (zero-indexed). This value can be accessed using the `{TestThreadId}` [placeholder](Placeholders.html). | | TestAffinity | Optional | Defines a filter applied to tests run in this thread. Only tests with the specified tag are executed in the thread.
**Example:** `testpath:Target:FireFox` only executes tests with the `FireFox` tag in the thread. | You can use the `{TestThreadId}` as a [placeholder](Placeholders.md) to reference the thread ID, e.g. to transform the name of the database instance you are accessing based on the thread ID, ensuring that each thread accesses a separate instance of the database. This prevents the threads from conflicting with one another when accessing the database, as thread 0 may manipulate data that is required by thread 1 otherwise. ## Example ```xml testpath:Target:FireFox ```