{TestThreadId} placeholder, which gives you the thread's integer ID.Thanks Stephen,
<?xml version="1.0" encoding="utf-8"?><TestProfile xmlns="http://www.specflow.org/schemas/plus/TestProfile/1.5"> <Settings projectName="SA.SEPA.Web.UI.Selenium" projectId="{87d3cf0c-91a7-4140-88d2-43688ee236c4}" /> <Execution stopAfterFailures="3" testThreadCount="4" testSchedulingMode="Sequential" retryCount="0" apartmentState="MTA" /> <Environment testThreadIsolation="AppDomain" platform="x86"/> <TestAssemblyPaths> <TestAssemblyPath>SA.SEPA.Web.UI.Selenium.dll</TestAssemblyPath> </TestAssemblyPaths> <DeploymentTransformation> <Steps> <RelocateConfigurationFile target="CustomConfig{TestThreadId}.config"/> <ConfigFileTransformation configFile="App.config" > <Transformation> <![CDATA[<?xml version="1.0" encoding="utf-8"?> <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> <appSettings> <add key="browser" value="{Target}" xdt:Locator="Match(key)" xdt:Transform="SetAttributes(value)" /> </appSettings> </configuration> ]]> </Transformation> </ConfigFileTransformation> </Steps> </DeploymentTransformation> <Targets> <Target name="IE"> <Filter>Browser_IE</Filter> </Target> <Target name="Chrome"> <Filter>Browser_Chrome</Filter> </Target> <Target name="Firefox"> <Filter>Browser_Firefox</Filter> </Target> </Targets></TestProfile> <TestThreads> <TestThread id="0"> <TestAffinity>Username1</TestAffinity>
<TestAffinity>Password1</TestAffinity>
</TestThread> <TestThread id="1"> <TestAffinity>Username2</TestAffinity> <TestAffinity>Password2</TestAffinity> </TestThread> </TestThreads>{TestThreadId}placeholder to ensure that the key for the user name is different for each thread, i.e. "User{TestThreadId}" will give you User1, User2 etc. It should look something like this:<add key="userName" value="User{testThreadId}"/>
<add key="threadID" value="{testThreadId}"/>
Querying the "threadID" setting will then return the current thread ID. You can then obviously implement your own logic based on the thread ID if you prefer.
I hope that helps you find a solution that meets your needs.