Skip to content
Leadtime
English
Esc
navigateopen⌘Jpreview

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}/evaluate
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Path parameters
projectIdstringrequired
Project ID
itemIdstringrequired
Component item ID
idstringrequired
Test case ID
Query parameters
fieldsToReturnstring
Comma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.
responseShapestring
Advanced 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:compactfull
Header parameters
LT-Response-Shapestring
Advanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:full
Request body
requiredapplication/json
statusstringrequired
Test status
Allowed:PassedPassedWithReservationsFailed
testCommentstring
Test comment in HTML or Markdown format (required if status is not Passed)
Responses
200Test case evaluation saved successfully
descriptionstringrequired
Test case description in HTML format
expectedResultstringrequired
Expected result in HTML format
idstringrequired
Test case ID
stepsstringrequired
Test steps in HTML format
testCommentstring | null
Test comment in HTML format (optional)
testStatusstring | null
Test status (optional)
Allowed:PassedPassedWithReservationsFailed
testedAtstring | null
Date when tested (optional)
testedBystring | null
User ID who tested (optional)
titlestringrequired
Test 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>"
}'
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"
}