createDefectForTestRun

Creates a defect from a test run. This operation only starts the process of adding a defect. Use addDefect to save the defect. A SOAP error envelope is returned if the operation fails.

Parameters

Parameter Type Description
cookie long Session cookie returned by projectLogon.
recordID long Unique test run record ID.

Return value

Value Type
pDefect CDefect

Example

CTestRun tr = ttsdk.getTestRun(cookie, 0, "Test run summary", false);

 

CDefect def = ttsdk.createDefectForTestRun(cookie, tr.recordid);

 

CFieldValue[] fields = ttsdk.getDropdownFieldValuesForTable(cookie, "Defect", "Type");

 

def.type = fields[0].value;

 

long defectID = ttsdk.addDefect(cookie, def);