hudson.plugins.PerfPublisher.TestDetails Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of perfpublisher Show documentation
Show all versions of perfpublisher Show documentation
The PerfPublisher plug-in scans for xml tests reports defined in the administration panel and generates trend graphs, computes stats and underline regressions and modifications. The xml files must be generated by your own testing tool.
package hudson.plugins.PerfPublisher;
import java.awt.Color;
import java.io.IOException;
import java.util.List;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.axis.CategoryAxis;
import org.jfree.chart.axis.CategoryLabelPositions;
import org.jfree.chart.axis.NumberAxis;
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.chart.renderer.category.CategoryItemRenderer;
import org.jfree.ui.RectangleInsets;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerResponse;
import hudson.model.ModelObject;
import hudson.model.AbstractBuild;
import hudson.model.Result;
import hudson.plugins.PerfPublisher.Report.Test;
import hudson.util.ChartUtil;
import hudson.util.ColorPalette;
import hudson.util.DataSetBuilder;
import hudson.util.ShiftedCategoryAxis;
import hudson.util.ChartUtil.NumberOnlyBuildLabel;
public class TestDetails implements ModelObject {
private final Test test;
private final AbstractBuild, ?> _owner;
public TestDetails(final AbstractBuild, ?> owner, Test test) {
this.test = test;
this._owner = owner;
}
public AbstractBuild, ?> getOwner() {
return _owner;
}
public String getDisplayName() {
return "Details of test " + test.getName();
}
public Test getTest() {
return test;
}
public String getSuccessGraph() {
String result = "";
Object ob_builds = (Object)_owner.getProject().getBuilds();
List