startTestExecution method
Future<StartTestExecutionResponse>
startTestExecution({
- required TestExecutionApiMode apiMode,
- required TestExecutionTarget target,
- required String testSetId,
- TestExecutionModality? testExecutionModality,
The action to start test set execution.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter apiMode :
Indicates whether we use streaming or non-streaming APIs for the test set
execution. For streaming, StartConversation Runtime API is used. Whereas,
for non-streaming, RecognizeUtterance and RecognizeText Amazon Lex Runtime
API are used.
Parameter target :
The target bot for the test set execution.
Parameter testSetId :
The test set Id for the test set execution.
Parameter testExecutionModality :
Indicates whether audio or text is used.
Implementation
Future<StartTestExecutionResponse> startTestExecution({
required TestExecutionApiMode apiMode,
required TestExecutionTarget target,
required String testSetId,
TestExecutionModality? testExecutionModality,
}) async {
final $payload = <String, dynamic>{
'apiMode': apiMode.value,
'target': target,
if (testExecutionModality != null)
'testExecutionModality': testExecutionModality.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/testsets/${Uri.encodeComponent(testSetId)}/testexecutions',
exceptionFnMap: _exceptionFns,
);
return StartTestExecutionResponse.fromJson(response);
}