describe_test_cases

describe_test_cases(**kwargs)

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

See also: AWS API Documentation

Request Syntax

response = client.describe_test_cases(
    reportArn='string',
    nextToken='string',
    maxResults=123,
    filter={
        'status': 'string',
        'keyword': 'string'
    }
)
Parameters
  • reportArn (string) --

    [REQUIRED]

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

  • 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.
  • maxResults (integer) -- 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.
  • filter (dict) --

    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.

Return type

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.

Exceptions

  • CodeBuild.Client.exceptions.InvalidInputException
  • CodeBuild.Client.exceptions.ResourceNotFoundException