Search in sources :

Example 1 with PlotPublisher

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

the class PlotPluginPropertiesTest method generate_simple_plot_properties.

@Test
public void generate_simple_plot_properties() {
    job.configure();
    job.copyResource(propertiesFilePath);
    PlotPublisher pub = job.addPublisher(PlotPublisher.class);
    Plot plot = pub.getPlot(1);
    plot.setGroup("Group_1");
    plot.setTitle("PropertiesPlot1");
    PropertiesDataSeries pSeries = plot.addDataSeries(PropertiesDataSeries.class, propertiesFileName);
    pSeries.setLabel("propLabel");
    job.save();
    job.startBuild().shouldSucceed();
    job.visit("plot");
    find(by.xpath("//h1[contains(text(), '%s')]", "Group_1"));
    find(by.xpath("//select[@name='choice']/option[contains(text(), '%s')]", "PropertiesPlot1"));
}
Also used : PropertiesDataSeries(org.jenkinsci.test.acceptance.plugins.plot.PropertiesDataSeries) PlotPublisher(org.jenkinsci.test.acceptance.plugins.plot.PlotPublisher) Plot(org.jenkinsci.test.acceptance.plugins.plot.Plot) AbstractJUnitTest(org.jenkinsci.test.acceptance.junit.AbstractJUnitTest) Test(org.junit.Test)

Example 2 with PlotPublisher

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

the class PlotPluginPropertiesTest method test_clickable_data_points.

@Test
public void test_clickable_data_points() throws IOException {
    job.configure();
    job.copyResource(propertiesFilePath);
    PlotPublisher pub = job.addPublisher(PlotPublisher.class);
    final Resource res = resource(propertiesFilePath);
    Properties prop = new Properties();
    prop.load(res.asInputStream());
    Plot plot = pub.getPlot(1);
    plot.setGroup("Group_1");
    plot.setTitle("PropertiesPlot1");
    PropertiesDataSeries pSeries = plot.addDataSeries(PropertiesDataSeries.class, propertiesFileName);
    job.save();
    job.startBuild().shouldSucceed();
    job.visit("plot");
    find(by.xpath("//map/area[contains(@title, '%s')]", prop.getProperty("YVALUE")));
    find(by.xpath("//map/area[contains(@href, '%s')]", prop.getProperty("URL")));
}
Also used : PropertiesDataSeries(org.jenkinsci.test.acceptance.plugins.plot.PropertiesDataSeries) PlotPublisher(org.jenkinsci.test.acceptance.plugins.plot.PlotPublisher) Plot(org.jenkinsci.test.acceptance.plugins.plot.Plot) Resource(org.jenkinsci.test.acceptance.junit.Resource) Properties(java.util.Properties) AbstractJUnitTest(org.jenkinsci.test.acceptance.junit.AbstractJUnitTest) Test(org.junit.Test)

Example 3 with PlotPublisher

use of org.jenkinsci.test.acceptance.plugins.plot.PlotPublisher 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)3 PlotPublisher (org.jenkinsci.test.acceptance.plugins.plot.PlotPublisher)3 AbstractJUnitTest (org.jenkinsci.test.acceptance.junit.AbstractJUnitTest)2 PropertiesDataSeries (org.jenkinsci.test.acceptance.plugins.plot.PropertiesDataSeries)2 Test (org.junit.Test)2 Properties (java.util.Properties)1 Resource (org.jenkinsci.test.acceptance.junit.Resource)1 XmlDataSeries (org.jenkinsci.test.acceptance.plugins.plot.XmlDataSeries)1