AWS CodeBuild

2020/09/08 - AWS CodeBuild - 2 updated api methods

Changes  AWS CodeBuild - Support keyword search for test cases in DecribeTestCases API . Allow deletion of reports in the report group, before deletion of report group using the deleteReports flag.

DeleteReportGroup (updated) Link ¶
Changes (request)
{'deleteReports': 'boolean'}

Deletes a report group. Before you delete a report group, you must delete its reports.

See also: AWS API Documentation

Request Syntax

client.delete_report_group(
    arn='string',
    deleteReports=True|False
)
type arn

string

param arn

[REQUIRED]

The ARN of the report group to delete.

type deleteReports

boolean

param deleteReports

If true , deletes any reports that belong to a report group before deleting the report group.

If false , you must delete any reports in the report group. Use ListReportsForReportGroup to get the reports in a report group. Use DeleteReport to delete the reports. If you call DeleteReportGroup for a report group that contains one or more reports, an exception is thrown.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

DescribeTestCases (updated) Link ¶
Changes (request)
{'filter': {'keyword': 'string'}}

Returns a list of details about test cases for a report.

See also: AWS API Documentation

Request Syntax

client.describe_test_cases(
    reportArn='string',
    nextToken='string',
    maxResults=123,
    filter={
        'status': 'string',
        'keyword': 'string'
    }
)
type reportArn

string

param reportArn

[REQUIRED]

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

type nextToken

string

param nextToken

During a previous call, the maximum number of items that can be returned is the value specified in maxResults . If there more items in the list, then a unique string called a nextToken is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.

type maxResults

integer

param maxResults

The maximum number of paginated test cases returned per response. Use nextToken to iterate pages in the list of returned TestCase objects. The default value is 100.

type filter

dict

param filter

A TestCaseFilter object used to filter the returned reports.

  • status (string) --

    The status used to filter test cases. A TestCaseFilter can have one status. Valid values are:

    • SUCCEEDED

    • FAILED

    • ERROR

    • SKIPPED

    • UNKNOWN

  • keyword (string) --

    A keyword that is used to filter on the name or the prefix of the test cases. Only test cases where the keyword is a substring of the name or the prefix will be returned.

rtype

dict

returns

Response Syntax

{
    'nextToken': 'string',
    'testCases': [
        {
            'reportArn': 'string',
            'testRawDataPath': 'string',
            'prefix': 'string',
            'name': 'string',
            'status': 'string',
            'durationInNanoSeconds': 123,
            'message': 'string',
            'expired': datetime(2015, 1, 1)
        },
    ]
}

Response Structure

  • (dict) --

    • nextToken (string) --

      During a previous call, the maximum number of items that can be returned is the value specified in maxResults . If there more items in the list, then a unique string called a nextToken is returned. To get the next batch of items in the list, call this operation again, adding the next token to the call. To get all of the items in the list, keep calling this operation with each subsequent next token that is returned, until no more next tokens are returned.

    • testCases (list) --

      The returned list of test cases.

      • (dict) --

        Information about a test case created using a framework such as NUnit or Cucumber. A test case might be a unit test or a configuration test.

        • reportArn (string) --

          The ARN of the report to which the test case belongs.

        • testRawDataPath (string) --

          The path to the raw data file that contains the test result.

        • prefix (string) --

          A string that is applied to a series of related test cases. CodeBuild generates the prefix. The prefix depends on the framework used to generate the tests.

        • name (string) --

          The name of the test case.

        • status (string) --

          The status returned by the test case after it was run. Valid statuses are SUCCEEDED , FAILED , ERROR , SKIPPED , and UNKNOWN .

        • durationInNanoSeconds (integer) --

          The number of nanoseconds it took to run this test case.

        • message (string) --

          A message associated with a test case. For example, an error message or stack trace.

        • expired (datetime) --

          The date and time a test case expires. A test case expires 30 days after it is created. An expired test case is not available to view in CodeBuild.