list method
Fetches the list of run results for the given test case.
A maximum of 100 results are kept for each test case.
Request parameters:
parent
- Required. The test case to list results for. Format:
projects//locations//agents// testCases/
. Specify a -
as a wildcard
for TestCase ID to list results across multiple test cases.
Value must have pattern
^projects/\[^/\]+/locations/\[^/\]+/agents/\[^/\]+/testCases/\[^/\]+$
.
filter
- The filter expression used to filter test case results. See
API Filtering. The expression is case insensitive.
Only 'AND' is supported for logical operators. The supported syntax is
listed below in detail: [AND ] ... [AND latest] The supported fields
and operators are: field operator environment
=
, IN
(Use value
draft
for draft environment) test_time
>
, <
latest
only returns
the latest test result in all results for each test case. Examples: *
"environment=draft AND latest" matches the latest test result for each
test case in the draft environment. * "environment IN (e1,e2)" matches any
test case results with an environment resource name of either "e1" or
"e2". * "test_time > 1602540713" matches any test case results with test
time later than a unix timestamp in seconds 1602540713.
pageSize
- The maximum number of items to return in a single page. By
default 100 and at most 1000.
pageToken
- The next_page_token value returned from a previous list
request.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a GoogleCloudDialogflowCxV3ListTestCaseResultsResponse.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<GoogleCloudDialogflowCxV3ListTestCaseResultsResponse> list(
core.String parent, {
core.String? filter,
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (filter != null) 'filter': [filter],
if (pageSize != null) 'pageSize': ['${pageSize}'],
if (pageToken != null) 'pageToken': [pageToken],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v3/' + core.Uri.encodeFull('$parent') + '/results';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return GoogleCloudDialogflowCxV3ListTestCaseResultsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}