use of com.epam.ta.reportportal.core.analyzer.auto.client.model.SuggestRq in project service-api by reportportal.
the class SuggestItemService method prepareSuggestRq.
private SuggestRq prepareSuggestRq(Launch launch, Project project) {
SuggestRq suggestRq = new SuggestRq();
suggestRq.setLaunchId(launch.getId());
suggestRq.setLaunchName(launch.getName());
suggestRq.setProject(project.getId());
suggestRq.setAnalyzerConfig(getAnalyzerConfig(project));
return suggestRq;
}
use of com.epam.ta.reportportal.core.analyzer.auto.client.model.SuggestRq in project service-api by reportportal.
the class SuggestItemService method prepareSuggestRq.
private SuggestRq prepareSuggestRq(TestItem testItem, Launch launch, Project project) {
SuggestRq suggestRq = prepareSuggestRq(launch, project);
suggestRq.setTestItemId(testItem.getItemId());
suggestRq.setUniqueId(testItem.getUniqueId());
suggestRq.setTestCaseHash(testItem.getTestCaseHash());
suggestRq.setLogs(AnalyzerUtils.fromLogs(logRepository.findAllUnderTestItemByLaunchIdAndTestItemIdsAndLogLevelGte(launch.getId(), Collections.singletonList(testItem.getItemId()), ERROR_INT)));
return suggestRq;
}
use of com.epam.ta.reportportal.core.analyzer.auto.client.model.SuggestRq in project service-api by reportportal.
the class SuggestItemService method suggestItems.
@Transactional(readOnly = true)
public List<SuggestedItem> suggestItems(Long testItemId, ReportPortalUser.ProjectDetails projectDetails, ReportPortalUser user) {
TestItem testItem = testItemRepository.findById(testItemId).orElseThrow(() -> new ReportPortalException(ErrorType.TEST_ITEM_NOT_FOUND, testItemId));
validateTestItem(testItem);
Launch launch = getLaunch(testItem.getLaunchId(), projectDetails, user);
Project project = getProjectHandler.getProject(projectDetails);
SuggestRq suggestRq = prepareSuggestRq(testItem, launch, project);
return getSuggestedItems(suggestRq);
}
use of com.epam.ta.reportportal.core.analyzer.auto.client.model.SuggestRq in project service-api by reportportal.
the class SuggestItemService method prepareSuggestRq.
private SuggestRq prepareSuggestRq(Cluster cluster, Launch launch, Project project) {
SuggestRq suggestRq = prepareSuggestRq(launch, project);
suggestRq.setClusterId(cluster.getIndexId());
return suggestRq;
}
use of com.epam.ta.reportportal.core.analyzer.auto.client.model.SuggestRq in project service-api by reportportal.
the class SuggestItemService method suggestClusterItems.
@Transactional(readOnly = true)
public List<SuggestedItem> suggestClusterItems(Long clusterId, ReportPortalUser.ProjectDetails projectDetails, ReportPortalUser user) {
final Cluster cluster = getClusterHandler.getById(clusterId);
final Launch launch = getLaunch(cluster.getLaunchId(), projectDetails, user);
final Project project = getProjectHandler.getProject(projectDetails);
final SuggestRq suggestRq = prepareSuggestRq(cluster, launch, project);
return getSuggestedItems(suggestRq);
}
Aggregations