use of org.jenkinsci.test.acceptance.po.BuildTrigger in project acceptance-test-harness by jenkinsci.
the class PublisherOrderTest method testOrdered.
@Test
public void testOrdered() {
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);
}
AggregateDownstreamTestResults aggregate = upstream.addPublisher(AggregateDownstreamTestResults.class);
aggregate.specify.check();
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");
upstream.save();
}
use of org.jenkinsci.test.acceptance.po.BuildTrigger 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");
}
Aggregations