Join 34,000+ subscribers and receive articles from our blog about software quality, testing, QA and security.

API Add Result Returns Title null

When using the API to update test results I am asking it to return the title of the test case it has updated but it is returning null. In fact any element of the test I ask it to return comes back null.

JSONObject r = (JSONObject) client.sendPost(“add_result/3407”, data);

When viewing a test case with get_case using the API the title returns correctly.

Does anyone know why the title would return the title as null when updating a test case but returns correct when viewing a test case?

Hey there,

Thanks for the post! The response content when using the add_result API method doesn’t include the test case title, which is why you’d be seeing that error. In order to get the correct title, since you’re already using the test ID to add the results you could also include a call using the get_test method in your script with the same ID to get the title.
I hope that helps! Let us know if you have any other questions.