use of htmlpublisher.HtmlPublisherTarget in project htmlpublisher-plugin by jenkinsci.
the class PublishHTMLStepTest method publishReportOnBuildLevel.
@Test
public void publishReportOnBuildLevel() throws Exception {
// Prepare the environment
writeTestHTML("index.html");
// Run the project
final HtmlPublisherTarget target = new HtmlPublisherTarget("testReport", TEST_REPORT_DIR, "index.html", true, false, false);
target.setReportTitles("index");
setupAndRunProject(target);
// Ensure that the report has been attached properly
r.assertBuildStatus(Result.SUCCESS, run);
HtmlPublisherTarget.HTMLAction jobReport = job.getAction(HtmlPublisherTarget.HTMLAction.class);
HtmlPublisherTarget.HTMLBuildAction buildReport = run.getAction(HtmlPublisherTarget.HTMLBuildAction.class);
assertNotNull("Report should be present at the project level", jobReport);
assertEquals(target.getReportName(), jobReport.getHTMLTarget().getReportName());
assertNotNull("Report should be present at the run level", buildReport);
assertEquals(target.getReportName(), buildReport.getHTMLTarget().getReportName());
}
use of htmlpublisher.HtmlPublisherTarget in project htmlpublisher-plugin by jenkinsci.
the class PublishHTMLStepTest method testDeprecationWarningDisplayedWhenTryingToResolveParameters.
@Test
public void testDeprecationWarningDisplayedWhenTryingToResolveParameters() throws Exception {
writeTestHTML("index.html");
final HtmlPublisherTarget target = new HtmlPublisherTarget("testReport", TEST_REPORT_DIR, "${TEST}", false, false, false);
setupAndRunProject(target);
// Ensure that the report has been attached properly
r.assertBuildStatus(Result.SUCCESS, run);
r.assertLogContains("*** WARNING ***", run);
}
use of htmlpublisher.HtmlPublisherTarget in project htmlpublisher-plugin by jenkinsci.
the class PublishHTMLStepTest method publishReportOnProjectLevel.
@Test
public void publishReportOnProjectLevel() throws Exception {
// Prepare the environment
writeTestHTML("index.html");
// Run the project
final HtmlPublisherTarget target = new HtmlPublisherTarget("testReport", TEST_REPORT_DIR, "index.html", false, false, false);
setupAndRunProject(target);
// Ensure that the report has been attached properly
r.assertBuildStatus(Result.SUCCESS, run);
HtmlPublisherTarget.HTMLAction jobReport = job.getAction(HtmlPublisherTarget.HTMLAction.class);
HtmlPublisherTarget.HTMLBuildAction buildReport = run.getAction(HtmlPublisherTarget.HTMLBuildAction.class);
assertNotNull("Report should be present at the project level", jobReport);
assertEquals(target.getReportName(), jobReport.getHTMLTarget().getReportName());
assertNull("Report should be missing at the run level", buildReport);
}
use of htmlpublisher.HtmlPublisherTarget in project htmlpublisher-plugin by jenkinsci.
the class PublishHTMLStepTest method configRoundTrip.
private void configRoundTrip(String reportName, String reportDir, String reportFiles) throws Exception {
final HtmlPublisherTarget target = new HtmlPublisherTarget(reportName, reportDir, reportFiles, false, false, false);
target.setReportTitles("index");
configRoundTrip(target);
}
Aggregations