跳到主要内容

Update execution case

This event is emitted after one or more writable fields of an execution case actually change. Submitting unchanged values does not emit an event. An overall execution result change derived from step results is included in the same event.

Event Body​

Execution Case Event Schema

Common structure

eventData

FieldTypeDescription
organizationIDstringOrganization that triggered the event.
teamIDstringTeam that triggered the event.
triggerUserIDstringUser that updated the execution case.
executionCaseIDstringID of the execution case.
planIssueIDstringID of the test plan issue containing the execution case.
sourceCaseIssueIDstringID of the source test case issue for the execution case.
changesobject[]Actual field and step changes with previous and new values.

changes[]

FieldTypeDescription
fieldIDstringID of the changed execution case field.
fieldTypestringField type, included for ordinary field changes.
valueTypestringValue type, included for ordinary field changes.
oldValueanyRaw value before the update. Always present.
newValueanyRaw value after the update. Always present.
stepIDstringSource step ID, included only for changes within a step.
stepPositionintegerStep position, included only for changes within a step.
changeTypestringstep_actual_result for actual results or step_execution_result for execution results.
  • Ordinary fields use raw scalar values; references use IDs. Multi-reference fields always use arrays and become [] when cleared. Cleared single-value fields use null. Step actual results use rich-text strings and become "" when cleared.
  • A step's actual result and execution result are separate changes with the same fieldID, field179. Repeated updates within one operation report the initial and final values.
  • Changes follow the execution activity scope and exclude automatically maintained update time, last executor, last execution time, and other internal changes. Rich-text changes contain the full content.
  • Values are captured in the write transaction and emitted after commit, without querying current values during asynchronous delivery. Deploy the events-api converter before the event producer.

Example​

{
"eventID": "Re6FSci9-1786000000000000002",
"eventType": "ones:test:execution_case:updated",
"timestamp": 1786000001000,
"subscriberID": "Re6FSci9",
"eventData": {
"organizationID": "mkobhu1u",
"teamID": "7A6aGmBc",
"triggerUserID": "U1esfPni",
"executionCaseID": "EC9HnuB1",
"planIssueID": "PLAN9Hnu",
"sourceCaseIssueID": "CASE9Hnu",
"changes": [
{
"fieldID": "field164",
"fieldType": "execution_result",
"valueType": "single_reference_object",
"oldValue": "to_do",
"newValue": "passed"
},
{
"fieldID": "field179",
"stepID": "STEP9Hnu",
"stepPosition": 1,
"changeType": "step_execution_result",
"oldValue": "to_do",
"newValue": "passed"
},
{
"fieldID": "field179",
"stepID": "STEP9Hnu",
"stepPosition": 1,
"changeType": "step_actual_result",
"oldValue": "",
"newValue": "<p>As expected</p>"
}
]
}
}