use of com.epam.ta.reportportal.core.analyzer.auto.strategy.analyze.AnalyzeItemsMode in project service-api by reportportal.
the class LaunchPatternAnalysisStrategy method analyze.
public void analyze(AnalyzeLaunchRQ analyzeRQ, ReportPortalUser.ProjectDetails projectDetails, ReportPortalUser user) {
Set<AnalyzeItemsMode> analyzeItemsModes = analyzeRQ.getAnalyzeItemsModes().stream().map(AnalyzeItemsMode::fromString).collect(toSet());
expect(analyzeItemsModes, CollectionUtils::isNotEmpty).verify(ErrorType.PATTERN_ANALYSIS_ERROR, "No analyze item mode specified.");
Launch launch = launchRepository.findById(analyzeRQ.getLaunchId()).orElseThrow(() -> new ReportPortalException(LAUNCH_NOT_FOUND, analyzeRQ.getLaunchId()));
validateLaunch(launch, projectDetails);
patternAnalyzer.analyzeTestItems(launch, analyzeItemsModes);
}
Aggregations