CodeBuild / Client / describe_code_coverages

describe_code_coverages#

CodeBuild.Client.describe_code_coverages(**kwargs)#

Retrieves one or more code coverage reports.

See also: AWS API Documentation

Request Syntax

response = client.describe_code_coverages(
    reportArn='string',
    nextToken='string',
    maxResults=123,
    sortOrder='ASCENDING'|'DESCENDING',
    sortBy='LINE_COVERAGE_PERCENTAGE'|'FILE_PATH',
    minLineCoveragePercentage=123.0,
    maxLineCoveragePercentage=123.0
)
Parameters:
  • reportArn (string) –

    [REQUIRED]

    The ARN of the report for which test cases are returned.

  • nextToken (string) – The nextToken value returned from a previous call to DescribeCodeCoverages. This specifies the next item to return. To return the beginning of the list, exclude this parameter.

  • maxResults (integer) – The maximum number of results to return.

  • sortOrder (string) – Specifies if the results are sorted in ascending or descending order.

  • sortBy (string) –

    Specifies how the results are sorted. Possible values are:

    FILE_PATH

    The results are sorted by file path.

    LINE_COVERAGE_PERCENTAGE

    The results are sorted by the percentage of lines that are covered.

  • minLineCoveragePercentage (float) – The minimum line coverage percentage to report.

  • maxLineCoveragePercentage (float) – The maximum line coverage percentage to report.

Return type:

dict

Returns:

Response Syntax

{
    'nextToken': 'string',
    'codeCoverages': [
        {
            'id': 'string',
            'reportARN': 'string',
            'filePath': 'string',
            'lineCoveragePercentage': 123.0,
            'linesCovered': 123,
            'linesMissed': 123,
            'branchCoveragePercentage': 123.0,
            'branchesCovered': 123,
            'branchesMissed': 123,
            'expired': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) –

    • nextToken (string) –

      If there are more items to return, this contains a token that is passed to a subsequent call to DescribeCodeCoverages to retrieve the next set of items.

    • codeCoverages (list) –

      An array of CodeCoverage objects that contain the results.

      • (dict) –

        Contains code coverage report information.

        Line coverage measures how many statements your tests cover. A statement is a single instruction, not including comments, conditionals, etc.

        Branch coverage determines if your tests cover every possible branch of a control structure, such as an if or case statement.

        • id (string) –

          The identifier of the code coverage report.

        • reportARN (string) –

          The ARN of the report.

        • filePath (string) –

          The path of the test report file.

        • lineCoveragePercentage (float) –

          The percentage of lines that are covered by your tests.

        • linesCovered (integer) –

          The number of lines that are covered by your tests.

        • linesMissed (integer) –

          The number of lines that are not covered by your tests.

        • branchCoveragePercentage (float) –

          The percentage of branches that are covered by your tests.

        • branchesCovered (integer) –

          The number of conditional branches that are covered by your tests.

        • branchesMissed (integer) –

          The number of conditional branches that are not covered by your tests.

        • expired (datetime) –

          The date and time that the tests were run.

Exceptions