describeCodeCoverages method
- required String reportArn,
- double? maxLineCoveragePercentage,
- int? maxResults,
- double? minLineCoveragePercentage,
- String? nextToken,
- ReportCodeCoverageSortByType? sortBy,
- SortOrderType? sortOrder,
Retrieves one or more code coverage reports.
May throw InvalidInputException.
Parameter reportArn
:
The ARN of the report for which test cases are returned.
Parameter maxLineCoveragePercentage
:
The maximum line coverage percentage to report.
Parameter maxResults
:
The maximum number of results to return.
Parameter minLineCoveragePercentage
:
The minimum line coverage percentage to report.
Parameter nextToken
:
The nextToken
value returned from a previous call to
DescribeCodeCoverages
. This specifies the next item to
return. To return the beginning of the list, exclude this parameter.
Parameter sortBy
:
Specifies how the results are sorted. Possible values are:
- FILE_PATH
- The results are sorted by file path.
- LINE_COVERAGE_PERCENTAGE
- The results are sorted by the percentage of lines that are covered.
Parameter sortOrder
:
Specifies if the results are sorted in ascending or descending order.
Implementation
Future<DescribeCodeCoveragesOutput> describeCodeCoverages({
required String reportArn,
double? maxLineCoveragePercentage,
int? maxResults,
double? minLineCoveragePercentage,
String? nextToken,
ReportCodeCoverageSortByType? sortBy,
SortOrderType? sortOrder,
}) async {
ArgumentError.checkNotNull(reportArn, 'reportArn');
_s.validateStringLength(
'reportArn',
reportArn,
1,
1152921504606846976,
isRequired: true,
);
_s.validateNumRange(
'maxLineCoveragePercentage',
maxLineCoveragePercentage,
0,
100,
);
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
_s.validateNumRange(
'minLineCoveragePercentage',
minLineCoveragePercentage,
0,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodeBuild_20161006.DescribeCodeCoverages'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'reportArn': reportArn,
if (maxLineCoveragePercentage != null)
'maxLineCoveragePercentage': maxLineCoveragePercentage,
if (maxResults != null) 'maxResults': maxResults,
if (minLineCoveragePercentage != null)
'minLineCoveragePercentage': minLineCoveragePercentage,
if (nextToken != null) 'nextToken': nextToken,
if (sortBy != null) 'sortBy': sortBy.toValue(),
if (sortOrder != null) 'sortOrder': sortOrder.toValue(),
},
);
return DescribeCodeCoveragesOutput.fromJson(jsonResponse.body);
}