public void update(final Statusable statusable) { if (Objects.isNull(statusable)) { return; } update(statusable.getStatus()); }
@Override public void update(final TestResult testResult) { if (testResult.isRetry()) { return; } statistic.update(testResult); }
public static Statistic updateStatistic(final Statistic statistic, final TreeNode treeNode) { if (treeNode instanceof TestResultTreeGroup) { final Statistic byLeafs = calculateStatisticByLeafs((TestResultTreeGroup) treeNode); statistic.update(byLeafs.getStatus()); } else if (treeNode instanceof TestResultTreeLeaf) { statistic.update(((TestResultTreeLeaf) treeNode).getStatus()); } return statistic; }
public static Statistic updateStatisticRecursive(final Statistic statistic, final TreeNode treeNode) { if (treeNode instanceof TestResultTreeGroup) { statistic.merge(calculateStatisticByLeafs((TestResultTreeGroup) treeNode)); } else if (treeNode instanceof TestResultTreeLeaf) { statistic.update(((TestResultTreeLeaf) treeNode).getStatus()); } return statistic; }
@Override protected SummaryData getData(final List<LaunchResults> launches) { final SummaryData data = new SummaryData() .setStatistic(new Statistic()) .setTime(new GroupTime()) .setReportName("Allure Report"); launches.stream() .flatMap(launch -> launch.getResults().stream()) .forEach(result -> { data.getStatistic().update(result); data.getTime().update(result); }); return data; } }
default void updateStatistic(Statusable statusable) { if (statusable == null) { return; } if (getStatistic() == null) { setStatistic(new Statistic()); } getStatistic().update(statusable.getStatus()); } }
private void updateHistory(final Map<String, HistoryData> history, final TestResult result, final ExecutorInfo info) { //@formatter:off final HistoryData data = history.computeIfAbsent( result.getHistoryId(), id -> new HistoryData().setStatistic(new Statistic()) ); //@formatter:on data.getStatistic().update(result); if (!data.getItems().isEmpty()) { result.addExtraBlock(HISTORY_BLOCK_NAME, copy(data)); } final HistoryItem newItem = new HistoryItem() .setUid(result.getUid()) .setStatus(result.getStatus()) .setStatusDetails(result.getStatusMessage()) .setTime(result.getTime()); if (Objects.nonNull(info.getReportUrl())) { newItem.setReportUrl(createReportUrl(info.getReportUrl(), result.getUid())); } final List<HistoryItem> newItems = Stream.concat(Stream.of(newItem), data.getItems().stream()) .limit(5) .collect(Collectors.toList()); data.setItems(newItems); }
public void update(final Statusable statusable) { if (Objects.isNull(statusable)) { return; } update(statusable.getStatus()); }
@Override public void update(final TestResult testResult) { if (testResult.isRetry()) { return; } statistic.update(testResult); }
public static Statistic updateStatistic(final Statistic statistic, final TreeNode treeNode) { if (treeNode instanceof TestResultTreeGroup) { final Statistic byLeafs = calculateStatisticByLeafs((TestResultTreeGroup) treeNode); statistic.update(byLeafs.getStatus()); } else if (treeNode instanceof TestResultTreeLeaf) { statistic.update(((TestResultTreeLeaf) treeNode).getStatus()); } return statistic; }
public static Statistic updateStatisticRecursive(final Statistic statistic, final TreeNode treeNode) { if (treeNode instanceof TestResultTreeGroup) { statistic.merge(calculateStatisticByLeafs((TestResultTreeGroup) treeNode)); } else if (treeNode instanceof TestResultTreeLeaf) { statistic.update(((TestResultTreeLeaf) treeNode).getStatus()); } return statistic; }
@Override protected SummaryData getData(final List<LaunchResults> launches) { final SummaryData data = new SummaryData() .setStatistic(new Statistic()) .setTime(new GroupTime()) .setReportName("Allure Report"); launches.stream() .flatMap(launch -> launch.getResults().stream()) .forEach(result -> { data.getStatistic().update(result); data.getTime().update(result); }); return data; } }
default void updateStatistic(Statusable statusable) { if (statusable == null) { return; } if (getStatistic() == null) { setStatistic(new Statistic()); } getStatistic().update(statusable.getStatus()); } }
private void updateHistory(final Map<String, HistoryData> history, final TestResult result, final ExecutorInfo info) { //@formatter:off final HistoryData data = history.computeIfAbsent( result.getHistoryId(), id -> new HistoryData().setStatistic(new Statistic()) ); //@formatter:on data.getStatistic().update(result); if (!data.getItems().isEmpty()) { result.addExtraBlock(HISTORY_BLOCK_NAME, copy(data)); } final HistoryItem newItem = new HistoryItem() .setUid(result.getUid()) .setStatus(result.getStatus()) .setStatusDetails(result.getStatusMessage()) .setTime(result.getTime()); if (Objects.nonNull(info.getReportUrl())) { newItem.setReportUrl(createReportUrl(info.getReportUrl(), result.getUid())); } final List<HistoryItem> newItems = Stream.concat(Stream.of(newItem), data.getItems().stream()) .limit(5) .collect(Collectors.toList()); data.setItems(newItems); }