Override TestRun Parameters with value including semi colons in Visual Studio Team Services

ending up to answer to myself with a workaround after contacting microsoft directly.

issue come up as well here on official vsts-task github: https://github.com/Microsoft/vsts-tasks/issues/2567

Workaround: before the test assembly task, run a powershell script taking path to runsettings file as parameter, reading VSTS environment variables and replace direcly XML values in runsettings.

I've provided my powershell script here : https://github.com/camous/vsts-powershell/blob/master/Set-RunSettings.ps1 (parameters have to be prefixed by "__")

and I wrote a more complete "how to" here: https://stuffandtacos.azurewebsites.net/2016/09/28/override-runsettings-parameters-in-visual-studio-team-service-when-value-contains-semi-colons/


Adding following (within double quotes) in Override test run parameters will also preserve the required format.

-key "$(PipelineVariableName)" instead of -key $(PipelineVariableName)

Note: I tested the above with pipeline variable value containing -(hyphen) and ' '(space).