Search in sources :

Example 1 with JUnitPublisher

use of org.jenkinsci.test.acceptance.po.JUnitPublisher in project acceptance-test-harness by jenkinsci.

the class PublisherOrderTest method testUnordered.

@Test
public void testUnordered() {
    FreeStyleJob upstream = jenkins.jobs.create(FreeStyleJob.class);
    upstream.configure();
    String command = "echo 'hello' > aggregate.txt";
    if (SystemUtils.IS_OS_UNIX) {
        upstream.addShellStep(command);
    } else {
        upstream.addBatchStep(command);
    }
    ArtifactArchiver archiver = upstream.addPublisher(ArtifactArchiver.class);
    archiver.includes("aggregate.txt");
    BuildTrigger trigger = upstream.addPublisher(BuildTrigger.class);
    trigger.childProjects.set("projectName");
    Fingerprint fingerprint = upstream.addPublisher(Fingerprint.class);
    fingerprint.targets.set("aggregate.txt");
    AggregateDownstreamTestResults aggregate = upstream.addPublisher(AggregateDownstreamTestResults.class);
    aggregate.specify.check();
    fingerprint.targets.set("another.txt");
    upstream.save();
    upstream.configure();
    archiver.includes("another.txt");
    JUnitPublisher junit = upstream.addPublisher(JUnitPublisher.class);
    fingerprint.targets.set("yetanother");
}
Also used : AggregateDownstreamTestResults(org.jenkinsci.test.acceptance.po.AggregateDownstreamTestResults) JUnitPublisher(org.jenkinsci.test.acceptance.po.JUnitPublisher) Fingerprint(org.jenkinsci.test.acceptance.po.Fingerprint) ArtifactArchiver(org.jenkinsci.test.acceptance.po.ArtifactArchiver) BuildTrigger(org.jenkinsci.test.acceptance.po.BuildTrigger) FreeStyleJob(org.jenkinsci.test.acceptance.po.FreeStyleJob) AbstractJUnitTest(org.jenkinsci.test.acceptance.junit.AbstractJUnitTest) Test(org.junit.Test)

Aggregations

AbstractJUnitTest (org.jenkinsci.test.acceptance.junit.AbstractJUnitTest)1 AggregateDownstreamTestResults (org.jenkinsci.test.acceptance.po.AggregateDownstreamTestResults)1 ArtifactArchiver (org.jenkinsci.test.acceptance.po.ArtifactArchiver)1 BuildTrigger (org.jenkinsci.test.acceptance.po.BuildTrigger)1 Fingerprint (org.jenkinsci.test.acceptance.po.Fingerprint)1 FreeStyleJob (org.jenkinsci.test.acceptance.po.FreeStyleJob)1 JUnitPublisher (org.jenkinsci.test.acceptance.po.JUnitPublisher)1 Test (org.junit.Test)1