I have a question about getting test details. If my test name contains comma or # symbols api returns The remote server returned an error: (400) Bad Request.
My query is:
http://tsbuild-app/guestAuth/app/rest/testOccurrences?locator=build:(id:xxxx),test:(name:<Test name with , or\and # symbols>)&fields=testOccurrence(test(xxxx))
I have tried to escape those symbols using powershell:
$encodedTeamcityTestName = [convert]::ToString($teamcityTestName).Replace( ',' , '%2с' );
$encodedTeamcityTestName = $encodedTeamcityTestName.Replace( '#' , '%23' )
$Url = "http://tsbuild-app/guestAuth/app/rest/testOccurrences?locator=build:(id:$BuildId),test:(name:$encodedTeamcityTestName)&fields=testOccurrence(test(id))"
This helped to get around the error, but did not return the result. How to build correct GET url?