mercredi 16 octobre 2019

Unable to update a testrun state to completed via API

We have been using curl with the VSTS / Azure API v5.1 to create testruns, post test results and set testruns with a state of 'completed' for a good while.

For the past few weeks, our requests to patch the testrun state to 'completed' from 'inProgress' are not committed.

(Yet we can use the same request to update other testrun attributes like the value for 'comment')

Documentation still mentions acceptable values to supply for state. https://docs.microsoft.com/en-us/rest/api/azure/devops/test/runs/update?view=azure-devops-rest-5.1#updating-started-date

Are you able to complete your testruns via the API? Thanks

curl -k -H "Content-Type: application/json" -H "Authorization: Basic {token}" --request PATCH -d "{'state':'Completed','build':{'id': 0},'comment':'an updated comment'}" https://dev.azure.com/etc/etc/_apis/test/runs/{testrunID}?api-version=5.1

Aucun commentaire:

Enregistrer un commentaire