Search in sources :

Example 1 with AnalyzeItemsMode

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);
}
Also used : ReportPortalException(com.epam.ta.reportportal.exception.ReportPortalException) Launch(com.epam.ta.reportportal.entity.launch.Launch) AnalyzeItemsMode(com.epam.ta.reportportal.core.analyzer.auto.strategy.analyze.AnalyzeItemsMode)

Aggregations

AnalyzeItemsMode (com.epam.ta.reportportal.core.analyzer.auto.strategy.analyze.AnalyzeItemsMode)1 Launch (com.epam.ta.reportportal.entity.launch.Launch)1 ReportPortalException (com.epam.ta.reportportal.exception.ReportPortalException)1