listTestCaseExecutionRecords method

Future<ListTestCaseExecutionRecordsResponse> listTestCaseExecutionRecords({
  1. required String instanceId,
  2. required String testCaseExecutionId,
  3. required String testCaseId,
  4. int? maxResults,
  5. String? nextToken,
  6. TestCaseExecutionStatus? status,
})

Lists detailed steps of test case execution that includes all observations along with actions taken and data associated in the specified Amazon Connect instance.

May throw AccessDeniedException. May throw InternalServiceException. May throw InvalidParameterException. May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException.

Parameter instanceId : The identifier of the Amazon Connect instance.

Parameter testCaseExecutionId : The identifier of the test case execution.

Parameter testCaseId : The identifier of the test case.

Parameter maxResults : The maximum number of results to return per page.

Parameter nextToken : The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.

Parameter status : Filter execution records by status.

Implementation

Future<ListTestCaseExecutionRecordsResponse> listTestCaseExecutionRecords({
  required String instanceId,
  required String testCaseExecutionId,
  required String testCaseId,
  int? maxResults,
  String? nextToken,
  TestCaseExecutionStatus? status,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
    if (status != null) 'status': [status.value],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/test-cases/${Uri.encodeComponent(instanceId)}/${Uri.encodeComponent(testCaseId)}/${Uri.encodeComponent(testCaseExecutionId)}/records',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListTestCaseExecutionRecordsResponse.fromJson(response);
}