use of org.jenkinsci.test.acceptance.po.WorkflowJob in project acceptance-test-harness by jenkinsci.
the class StageViewTest method stageViewContainsMultipleStagesWithUnstable.
/**
* Does check multiple jobs in the stage view. One with a unstable, and one with a success. Unstable jobs
* are represented with yellow color and represented with the css class "UNSTABLE".
*/
@Test
public void stageViewContainsMultipleStagesWithUnstable() {
WorkflowJob job = this.createPipelineFromFile(MUTLI_JOB_UNSTABLE);
job.startBuild().shouldBeUnstable();
job.open();
job.getNavigationLinks();
StageView stageView = new StageView(job, JOB_PATH);
String firstJob = stageView.getLatestBuild().getStageViewItem(0).toString();
assertThat(stageView.getLatestBuild().getCssClasses(), containsString("UNSTABLE"));
assertThat(firstJob, containsString("ms"));
}
use of org.jenkinsci.test.acceptance.po.WorkflowJob in project acceptance-test-harness by jenkinsci.
the class StageViewTest method stageViewContainsMultipleStagesWithAborted.
/**
* Does check multiple jobs in the stage view. One with a success, and one with aborted.
* Aborted jobs are not represented in the satgeview. They are also shown green.
*/
@Test
public void stageViewContainsMultipleStagesWithAborted() {
WorkflowJob job = this.createPipelineFromFile(MUTLI_JOB_ABORTED);
job.startBuild().shouldAbort();
job.open();
job.getNavigationLinks();
StageView stageView = new StageView(job, JOB_PATH);
String firstJob = stageView.getLatestBuild().getStageViewItem(0).toString();
assertThat(stageView.getLatestBuild().getCssClasses(), containsString("ABORTED"));
assertThat(firstJob, containsString("ms"));
}
use of org.jenkinsci.test.acceptance.po.WorkflowJob in project acceptance-test-harness by jenkinsci.
the class WorkflowMultibranchTest method testMultibranchPipeline.
@Ignore("cannot run quickly as anonymous due to github rate limiting")
@Test
public void testMultibranchPipeline() {
final WorkflowMultiBranchJob multibranchJob = jenkins.jobs.create(WorkflowMultiBranchJob.class);
this.configureJobWithGithubBranchSource(multibranchJob);
multibranchJob.save();
multibranchJob.waitForBranchIndexingFinished(20);
this.assertBranchIndexing(multibranchJob);
final WorkflowJob successJob = multibranchJob.getJob("jenkinsfile_success");
final WorkflowJob failureJob = multibranchJob.getJob("jenkinsfile_failure");
this.assertExistAndRun(successJob, true);
this.assertExistAndRun(failureJob, false);
multibranchJob.open();
multibranchJob.reIndex();
multibranchJob.waitForBranchIndexingFinished(20);
this.assertExistAndRun(successJob, true);
this.assertExistAndRun(failureJob, false);
}
use of org.jenkinsci.test.acceptance.po.WorkflowJob in project acceptance-test-harness by jenkinsci.
the class FindBugsPluginTest method verifyResult.
private void verifyResult(final String result, final Consumer<Build> buildResultCheck) {
String[] parameters = { ", " + result + "TotalAll: '5'", ", " + result + "TotalHigh: '1'", ", " + result + "TotalNormal: '3'" };
for (String additionalParameters : parameters) {
WorkflowJob job = createPipelineWith(FILE_WITH_6_WARNINGS, "FindBugsPublisher", additionalParameters);
Build build = buildJobAndWait(job);
buildResultCheck.accept(build);
}
}
use of org.jenkinsci.test.acceptance.po.WorkflowJob in project acceptance-test-harness by jenkinsci.
the class GitUserContentTest method createAndBuildWorkflowJob.
private Build createAndBuildWorkflowJob(final String script) {
final WorkflowJob job = jenkins.jobs.create(WorkflowJob.class);
job.script.set(script);
job.save();
return job.startBuild().shouldSucceed();
}
Aggregations