To queue a build i use this ps script
param ( [string]$definitionName = "", [string]$testFilter = "" ) $rootTfsUri = "rootUri" $collectionName = "CollectionName" $projectName = "ProjName" $tfsUri = $rootTfsUri + "/" + $collectionName + "/" + $projectName $buildDefinition = "WebTesting-Regress-" + $definitionName $buildDefinitionUri = "$tfsUri/_apis/build/definitions?api-version=3.1&name=$buildDefinition" # first get build definition id $buildResponse = Invoke-WebRequest -Uri $buildDefinitionUri -UseDefaultCredentials -Method Get -Verbose -UseBasicParsing -ContentType "application/json" $buildResponseAsJson = $buildResponse.Content | convertfrom-json $buildDefinitionId = $buildResponseAsJson.value.id # Now queue this build definition $requestContentString = @" { "definition": { "id" : "$buildDefinitionId" }, "variables": { "testFilter": { "value": "$testFilter" } } } "@ $buildUri = "$tfsUri/_apis/build/builds?api-version=3.1" $buildResponse = Invoke-WebRequest -Uri $buildUri -UseDefaultCredentials -Method Post -Verbose -UseBasicParsing -ContentType "application/json" -Body $requestContentString $buildNumber = ($buildResponse.Content | ConvertFrom-Json).buildNumber it works good but i need to change build variable before my test started, how can i do this? i've tried to send it with id in body but it didn't works