getReportGroupTrend method
Analyzes and accumulates test report values for the specified test reports.
May throw InvalidInputException.
May throw ResourceNotFoundException.
Parameter reportGroupArn :
The ARN of the report group that contains the reports to analyze.
Parameter trendField :
The test report value to accumulate. This must be one of the following
values:
- Test reports:
-
- DURATION
- Accumulate the test run times for the specified reports.
- PASS_RATE
- Accumulate the percentage of tests that passed for the specified test reports.
- TOTAL
- Accumulate the total number of tests for the specified test reports.
- Code coverage reports:
-
- BRANCH_COVERAGE
- Accumulate the branch coverage percentages for the specified test reports.
- BRANCHES_COVERED
- Accumulate the branches covered values for the specified test reports.
- BRANCHES_MISSED
- Accumulate the branches missed values for the specified test reports.
- LINE_COVERAGE
- Accumulate the line coverage percentages for the specified test reports.
- LINES_COVERED
- Accumulate the lines covered values for the specified test reports.
- LINES_MISSED
- Accumulate the lines not covered values for the specified test reports.
Parameter numOfReports :
The number of reports to analyze. This operation always retrieves the most
recent reports.
If this parameter is omitted, the most recent 100 reports are analyzed.
Implementation
Future<GetReportGroupTrendOutput> getReportGroupTrend({
required String reportGroupArn,
required ReportGroupTrendFieldType trendField,
int? numOfReports,
}) async {
_s.validateNumRange(
'numOfReports',
numOfReports,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'CodeBuild_20161006.GetReportGroupTrend'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'reportGroupArn': reportGroupArn,
'trendField': trendField.value,
if (numOfReports != null) 'numOfReports': numOfReports,
},
);
return GetReportGroupTrendOutput.fromJson(jsonResponse.body);
}