Caution

This page documents the latest, unreleased version of Buildbot. For documentation for released versions, see http://docs.buildbot.net/current/.

3.5.22. test_result

resource type: test_result
Attributes:
  • test_resultid (integer) – the unique ID of this test result

  • builderid (integer) – id of the builder for this test result

  • test_result_setid (integer) – id of the test result set that the test result belongs to

  • test_name? (string) – the name of the test, if any

  • test_code_path? (string) – the code path associated to test, if any

  • line? (string) – the number of the line in the code path that produced this result, if any

  • duration_ns? (integer) – the number of nanoseconds it took to perform the test, if available

  • value (string) – the value of the test

example

{
    "test_resultid": 1042,
    "builderid": 14,
    "test_result_setid": 412,
    "test_name": "test.perf.buildbot.api.123",
    "test_code_path": "master/buildbot/spec/types/test_result.raml",
    "duration_ns": 120410,
    "line": 123,
    "value": "31.1382"
}

This resource represents a test result. Test results that are produced by a single test run are grouped by a relation to a test result set. Single test result set may represent thousands of test results.

3.5.22.1. Update Methods

All update methods are available as attributes of master.data.updates.

class buildbot.data.test_result_sets.TestResult
addTestResults(builderid, test_result_setid, result_values)
Parameters:
  • builderid (integer) – The ID of the builder corresponding to the test result set

  • test_result_setid (integer) – The ID of the test result set for which to add results

  • result_values (integer) – A list of dictionaries that define the test results

Creates one or more new test results. This is a batch-based method as large number of test results are usually associated to a single test result set.

The dictionaries in result_value may have the following keys:

  • value (required): A string containing the value of the test result

  • test_name (optional): A string containing the name of the test

  • test_code_path (optional): A string containing the path of the test

  • line (optional): An integer containing the line within the source file corresponding to the test

  • duration_ns (optional): An integer defining the duration of the test in nanoseconds

At least one of test_name and test_code_path must be specified.

The function returns nothing.

3.5.22.2. Endpoints

path: /test_result_sets/{test_result_setid}/results
Path Keys:

test_result_setid (number) – the id of the test result set

This path selects all test results for the given test result set

GET
returns

collection of test_result