diff --git a/report-jtreg-comparator/src/main/java/io/jenkins/plugins/report/jtreg/main/comparator/StackTraceCompare.java b/report-jtreg-comparator/src/main/java/io/jenkins/plugins/report/jtreg/main/comparator/StackTraceCompare.java index 09f46d7..9d7739b 100644 --- a/report-jtreg-comparator/src/main/java/io/jenkins/plugins/report/jtreg/main/comparator/StackTraceCompare.java +++ b/report-jtreg-comparator/src/main/java/io/jenkins/plugins/report/jtreg/main/comparator/StackTraceCompare.java @@ -94,8 +94,14 @@ public static void compareTraces(Map> failedMap, Optio stringToPut = String.valueOf(getTraceSimilarity(reference, second)); } - table[i][jobBuilds.indexOf(value) + 1] = - options.getFormatter().createCell(new JtregPluginServicesLinkWithTooltip(stringToPut)); + List maybeSeveralComaprisons = new ArrayList<>(); + maybeSeveralComaprisons.add(new JtregPluginServicesLinkWithTooltip(stringToPut, null, getLinksTooltip(), true)); + //this is just demo + //FIXME repace by real logic + if ((jobBuilds.indexOf(value) + i + 1 )%2 == 0){ + maybeSeveralComaprisons.add(new JtregPluginServicesLinkWithTooltip("X", "test", getLinksTooltip(), true)); + } + table[i][jobBuilds.indexOf(value) + 1] = options.getFormatter().createCell(maybeSeveralComaprisons); } // TODO delete, just for debug logging @@ -108,6 +114,15 @@ public static void compareTraces(Map> failedMap, Optio options.getFormatter().printTable(table, failedTests.size() + 1, jobBuilds.size() + 1); } + private static List getLinksTooltip() { + List list = new ArrayList<>(); + list.add(new JtregPluginServicesLinkWithTooltip("this is tool tip of comparison of $TEST trace of $job1:$X x $job2:$Y")); + list.add(new JtregPluginServicesLinkWithTooltip("use this as base", "some link", null)); + list.add(new JtregPluginServicesLinkWithTooltip("show diff agaisnt base", "some otjer link", null)); + list.add(new JtregPluginServicesLinkWithTooltip("show diff ind ifferent setup", "other link", null)); + return list; + } + private static String getTestTrace(File build, String testName, Options.Side cutSide, int cutLength) { try { BuildReportExtended bex = bs.parseBuildReportExtended(new RunWrapperFromDir(build), null); diff --git a/report-jtreg-comparator/src/test/java/io/jenkins/plugins/report/jtreg/main/comparator/PrintTableTest.java b/report-jtreg-comparator/src/test/java/io/jenkins/plugins/report/jtreg/main/comparator/PrintTableTest.java index 79ad921..73d94c6 100644 --- a/report-jtreg-comparator/src/test/java/io/jenkins/plugins/report/jtreg/main/comparator/PrintTableTest.java +++ b/report-jtreg-comparator/src/test/java/io/jenkins/plugins/report/jtreg/main/comparator/PrintTableTest.java @@ -79,6 +79,11 @@ public void testHtmlTablePrinting() { f.printTable(table, 4, 4); Assertions.assertEquals("