get method

Future<TestMatrix> get(
  1. String projectId,
  2. String testMatrixId, {
  3. String? $fields,
})

Checks the status of a test matrix and the executions once they are created.

The test matrix will contain the list of test executions to run if and only if the resultStorage.toolResultsExecution fields have been populated. Note: Flaky test executions may be added to the matrix at a later stage. May return any of the following canonical error codes: - PERMISSION_DENIED

  • if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the Test Matrix does not exist

Request parameters:

projectId - Cloud project that owns the test matrix.

testMatrixId - Unique test matrix id which was assigned by the service.

$fields - Selector specifying which fields to include in a partial response.

Completes with a TestMatrix.

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<TestMatrix> get(
  core.String projectId,
  core.String testMatrixId, {
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v1/projects/' +
      commons.escapeVariable('$projectId') +
      '/testMatrices/' +
      commons.escapeVariable('$testMatrixId');

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return TestMatrix.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}