Mercury Test Results Help > Analyzing Test Results in the Unified Report View > Reporting Defects Detected During a Test Run > Reporting Defects During a Test Run PreviousNext

Reporting Defects During a Test Run

You can insert qcdb_add_defect statements to your test to instruct WinRunner to add a defect to a Quality Center project based on conditions you define in your test script. Your statement can include data for the summary and description fields, as well as any other field name and value you specify.

For example, suppose your test begins by logging in to a flight reservation application. If the login is unsuccessful, you can report a defect that specifies the summary and description of the defect as well as the values for the Detected by and Assigned to fields.

Use the following syntax when inserting qcdb_add_defect statements:

qcdb_add_defect (summary, description, defect_fields);

When entering defect fields, use the format: "FieldName1=Value1;FieldName2=Value2;FieldNameN=ValueN".

Be sure to enter field names and not field labels. For example, use the field name BG_DETECTED_BY for the field label Detected By. For more information, refer to the Mercury Quality Center documentation.

If your test contains qcdb_add_defect statements, confirm that you are connected to the appropriate Quality Center project before running your test.


Copyright 2007 Mercury Interactive Corporation