Search in sources :

Example 1 with XmlDataSeries

use of org.jenkinsci.test.acceptance.plugins.plot.XmlDataSeries in project acceptance-test-harness by jenkinsci.

the class PlotPluginXmlTest method generateXmlPlotWithTwoDataSeriesTest.

@Ignore("Plot-Plugin functionality not yet ready")
@Test
public void generateXmlPlotWithTwoDataSeriesTest() {
    Plot p1 = setupFirstPlot();
    // this will override first csv line inside plot
    XmlDataSeries xmlDataSeries2 = p1.addDataSeries(XmlDataSeries.class);
    xmlDataSeries2.setFile("plot.xml");
    xmlDataSeries2.setUrl("http://foo.foo");
    xmlDataSeries2.setXpath("count(/books/book[author='Max, Mustermann'])");
    xmlDataSeries2.selectResultTypNumber();
    job.save();
    job.startBuild().shouldSucceed();
    job.visit("plot");
    find(by.xpath("//map/area[contains(@href, '%s')]", "http://foo.foo"));
    find(by.xpath("//map/area[contains(@href, '%s')]", "http://foo.bar"));
}
Also used : Plot(org.jenkinsci.test.acceptance.plugins.plot.Plot) XmlDataSeries(org.jenkinsci.test.acceptance.plugins.plot.XmlDataSeries) Ignore(org.junit.Ignore) AbstractJUnitTest(org.jenkinsci.test.acceptance.junit.AbstractJUnitTest) Test(org.junit.Test)

Example 2 with XmlDataSeries

use of org.jenkinsci.test.acceptance.plugins.plot.XmlDataSeries in project acceptance-test-harness by jenkinsci.

the class PlotPluginXmlTest method setupFirstPlot.

private Plot setupFirstPlot() {
    job.configure();
    job.copyResource(resource("/plot_plugin/plot.xml"));
    PlotPublisher pub = job.addPublisher(PlotPublisher.class);
    Plot p1 = pub.getPlot(1);
    p1.setGroup("G1");
    p1.setTitle("XML plot");
    p1.setStyle("Line");
    XmlDataSeries xmlDataSeries1 = p1.addDataSeries(XmlDataSeries.class);
    xmlDataSeries1.setFile("plot.xml");
    xmlDataSeries1.setXpath("count(/books/book[price>35.00])");
    xmlDataSeries1.setUrl("http://foo.bar");
    xmlDataSeries1.selectResultTypNumber();
    return p1;
}
Also used : PlotPublisher(org.jenkinsci.test.acceptance.plugins.plot.PlotPublisher) Plot(org.jenkinsci.test.acceptance.plugins.plot.Plot) XmlDataSeries(org.jenkinsci.test.acceptance.plugins.plot.XmlDataSeries)

Aggregations

Plot (org.jenkinsci.test.acceptance.plugins.plot.Plot)2 XmlDataSeries (org.jenkinsci.test.acceptance.plugins.plot.XmlDataSeries)2 AbstractJUnitTest (org.jenkinsci.test.acceptance.junit.AbstractJUnitTest)1 PlotPublisher (org.jenkinsci.test.acceptance.plugins.plot.PlotPublisher)1 Ignore (org.junit.Ignore)1 Test (org.junit.Test)1