Evaluate a test case
Mark a test case as passed or failed with optional comment. Uses Projects.processComponentsTestCases permission, allowing test evaluation without full component management access. Automatically sets testedBy and testedAt fields. Updates project configuration flag and recalculates conditions.
POST
/projects/{projectId}/items/{itemId}/testcases/{id}/evaluateAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
projectIdstringrequiredProject ID
itemIdstringrequiredComponent item ID
idstringrequiredTest case ID
Query parameters
fieldsToReturnstringComma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.
responseShapestringAdvanced override. Omit for the endpoint compact default. Use full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:
compactfullHeader parameters
LT-Response-ShapestringAdvanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:
fullRequest body
requiredapplication/jsonstatusstringrequiredTest status
Allowed:
PassedPassedWithReservationsFailedtestCommentstringTest comment in HTML or Markdown format (required if status is not Passed)
Responses
200Test case evaluation saved successfully
descriptionstringrequiredTest case description in HTML format
expectedResultstringrequiredExpected result in HTML format
idstringrequiredTest case ID
stepsstringrequiredTest steps in HTML format
testCommentstring | nullTest comment in HTML format (optional)
testStatusstring | nullTest status (optional)
Allowed:
PassedPassedWithReservationsFailedtestedAtstring | nullDate when tested (optional)
testedBystring | nullUser ID who tested (optional)
titlestringrequiredTest case title
400Invalid request data or test case does not belong to component in project
401Unauthorized - Invalid or missing authentication token
403User does not have permission to evaluate test cases
404Test case not found or does not belong to the specified project
Request
curl -X POST "https://leadtime.app/api/public/projects/550e8400-e29b-41d4-a716-446655440000/items/550e8400-e29b-41d4-a716-446655440001/testcases/550e8400-e29b-41d4-a716-446655440002/evaluate" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status": "Passed",
"testComment": "<p>Found an issue with the login validation.</p>"
}'const response = await fetch("https://leadtime.app/api/public/projects/550e8400-e29b-41d4-a716-446655440000/items/550e8400-e29b-41d4-a716-446655440001/testcases/550e8400-e29b-41d4-a716-446655440002/evaluate", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"status": "Passed",
"testComment": "<p>Found an issue with the login validation.</p>"
})
});import requests
response = requests.post(
"https://leadtime.app/api/public/projects/550e8400-e29b-41d4-a716-446655440000/items/550e8400-e29b-41d4-a716-446655440001/testcases/550e8400-e29b-41d4-a716-446655440002/evaluate",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"status": "Passed",
"testComment": "<p>Found an issue with the login validation.</p>"
},
)Response
{
"description": "<p>Verify that users can log in with valid credentials.</p>",
"expectedResult": "<p>User is successfully logged in and redirected to dashboard.</p>",
"id": "550e8400-e29b-41d4-a716-446655440010",
"steps": "<ol><li>Navigate to login page</li><li>Enter credentials</li><li>Click login button</li></ol>",
"testComment": "<p>Test passed successfully.</p>",
"testStatus": "Passed",
"testedAt": "2024-01-01T00:00:00.000Z",
"testedBy": "550e8400-e29b-41d4-a716-446655440020",
"title": "Test login with valid credentials"
}Invalid request data or test case does not belong to component in project
Unauthorized - Invalid or missing authentication token
User does not have permission to evaluate test cases
Test case not found or does not belong to the specified project