addDefectWithLink
Adds a defect that links to a test run in the project. If valid information is sent, a record ID for the defect is returned. A SOAP error envelope is returned if the operation fails.
Parameters
| Parameter | Type | Description |
|---|---|---|
| cookie | long | Session cookie returned by projectLogon. |
| pDefect | CDefect | Defect field values and properties. |
| testRunRecordID | long | Unique test run record ID to link to. |
Return value
| Value | Type |
|---|---|
| recordID | long |
Example
CTestRun tr = ttsdk.getTestRun(cookie, 0, "Test run summary", false);
CDefect def = new CDefect();
def.summary = "Defect summary";
def.type = "Cosmetic";
long defectID = ttsdk.addDefectWithLink(cookie, def, tr.recordid);