API: Test results
The following API methods are used to submit test results to TestRail. Please note the different approaches and methods to submit results.
add_result
Use this method to add a result to a test, specified by its test ID.
Method: add_result HTTP: POST URL: index.php?/miniapi/add_result/<test_id> Result: ID of the test change
Post arguments:
- status_id 1 = Passed 2 = Blocked 4 = Retest 5 = Failed - comment - version - elapsed - defects - assignedto_id - custom fields can be added with their system names, prefixed with 'custom_'
add_result_for_case
Use this method to add a result to a test, specified by the test run and test case IDs. This alternative method is useful as the test case ID never changes. TestRail will automatically look up the test based on the specified test run and test case ID.
Method: add_result_for_case HTTP: POST URL: index.php?/miniapi/add_result_for_case/<run_id>/<case_id> Result: ID of the test change
Post arguments:
- status_id 1 = Passed 2 = Blocked 4 = Retest 5 = Failed - comment - version - elapsed - defects - assignedto_id - custom fields can be added with their system names, prefixed with 'custom_'
