I am trying to create a static Test Suite using REST API but i am getting an error in my response.
i am trying to follow the https://docs.microsoft.com/en-us/rest/api/azure/devops/test/test%20%20suites/create?view=azure-devops-rest-5.0&viewFallbackFrom=azure-devops-rest-6.0
My Request Body
$body= @"
[ {
"suiteType": "StaticTestSuite",
"name": "NewTestSuite",
"area": {
"name": "<TeamName>"
},
"iteration": "<Iteration>"
}
]"@
$BuildReqBodyJson = $body | ConvertTo-Json
$response = Invoke-RestMethod -Uri $Uri -Method POST -Headers $header -ContentType "application/json" -Body $BuildReqBodyJson
Error :
Invoke-RestMethod : {"$id":"1","innerException":null,"message":"Value cannot be null.\r\nParameter name:
testSuite","typeName":"System.ArgumentNullException, mscorlib","typeKey":"ArgumentNullException","errorCode":0,"eventId":0}
At
+ $response = Invoke-RestMethod -Uri $Uri -Method POST -Headers $heade ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand