Search in sources :

Example 51 with Job

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

the class GitPluginNoDockerTest method generateJobWithRemoteName.

private Job generateJobWithRemoteName(GIT_IMPL type) {
    Job job = generateJob(type);
    GitScm scm = generateSCM(job).remoteName("custom_origin");
    useJGitIfNeccesary(type, scm);
    return job;
}
Also used : Job(org.jenkinsci.test.acceptance.po.Job) GitScm(org.jenkinsci.test.acceptance.plugins.git.GitScm)

Example 52 with Job

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

the class AbstractAnalysisTest method should_store_trend_selection_in_cookie.

/**
 * Runs the test case {@link #should_have_trend_graph_with_relative_links_in_freestyle_job()} with a job that
 * contains a space in the name. Then the trend is deactivated in the trend configuration view: now the trend should
 * be replaced with a link to re-enable the trend. Finally, this link is clicked in order open the trend
 * configuration again.
 */
@Test
@Issue({ "JENKINS-25917", "JENKINS-32377" })
@Since("2.0")
public void should_store_trend_selection_in_cookie() {
    Job job = buildFreestyleJobTwoTimesInARow();
    assertThat(job.name, containsString("_"));
    job = job.renameTo(job.name.replace("_", " "));
    AnalysisAction action = createProjectAction(job);
    verifyTrendGraphOverview(job, action, getNumberOfWarnings());
    deactivateTrendGraph(job, action);
}
Also used : AnalysisAction(org.jenkinsci.test.acceptance.plugins.analysis_core.AnalysisAction) Job(org.jenkinsci.test.acceptance.po.Job) FreeStyleJob(org.jenkinsci.test.acceptance.po.FreeStyleJob) WorkflowJob(org.jenkinsci.test.acceptance.po.WorkflowJob) Issue(org.jvnet.hudson.test.Issue) AbstractJUnitTest(org.jenkinsci.test.acceptance.junit.AbstractJUnitTest) Test(org.junit.Test) Since(org.jenkinsci.test.acceptance.junit.Since)

Example 53 with Job

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

the class AbstractAnalysisTest method should_have_trend_graph_with_relative_links_in_pipeline.

/**
 * Builds a pipeline with an enabled publisher of the plug-in under test two times in a row. Verifies that
 * afterwards a trend graph exists that contains 6 relative links to the plug-in results (one for each priority and
 * build).
 */
@Test
@WithPlugins("workflow-aggregator")
@Issue("31202")
public void should_have_trend_graph_with_relative_links_in_pipeline() {
    Job job = runTwoTimesInARow(createPipeline());
    verifyTrendGraph(job, getNumberOfWarnings());
}
Also used : Job(org.jenkinsci.test.acceptance.po.Job) FreeStyleJob(org.jenkinsci.test.acceptance.po.FreeStyleJob) WorkflowJob(org.jenkinsci.test.acceptance.po.WorkflowJob) Issue(org.jvnet.hudson.test.Issue) AbstractJUnitTest(org.jenkinsci.test.acceptance.junit.AbstractJUnitTest) Test(org.junit.Test) WithPlugins(org.jenkinsci.test.acceptance.junit.WithPlugins)

Example 54 with Job

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

the class AbstractAnalysisTest method should_have_trend_graph_with_relative_links_in_freestyle_job.

/**
 * Builds a freestyle job with an enabled publisher of the plug-in under test two times in a row. Verifies that
 * afterwards a trend graph exists that contains 6 relative links to the plug-in results (one for each priority and
 * build).
 */
@Test
@Issue({ "JENKINS-21723", "JENKINS-29900" })
public void should_have_trend_graph_with_relative_links_in_freestyle_job() {
    Job job = buildFreestyleJobTwoTimesInARow();
    verifyTrendGraph(job, getNumberOfWarnings());
}
Also used : Job(org.jenkinsci.test.acceptance.po.Job) FreeStyleJob(org.jenkinsci.test.acceptance.po.FreeStyleJob) WorkflowJob(org.jenkinsci.test.acceptance.po.WorkflowJob) Issue(org.jvnet.hudson.test.Issue) AbstractJUnitTest(org.jenkinsci.test.acceptance.junit.AbstractJUnitTest) Test(org.junit.Test)

Example 55 with Job

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

the class AnalysisCollectorPluginTest method should_set_build_result_to_unstable.

/**
 * Verifies that a build should become status unstable when a warning threshold is exceeded.
 */
@Test
public void should_set_build_result_to_unstable() {
    FreeStyleJob job = jenkins.jobs.create();
    job.configure();
    job.copyResource(ANALYSIS_COLLECTOR_PLUGIN_RESOURCES + "/findbugs.xml");
    job.addPublisher(FindBugsFreestyleSettings.class);
    AnalysisCollectorSettings analysis = job.addPublisher(AnalysisCollectorSettings.class);
    AnalysisConfigurator<AnalysisCollectorSettings> configurator = settings -> settings.setBuildUnstableTotalAll("5");
    configurator.accept(analysis);
    job.save();
    buildUnstableJob(job);
}
Also used : DashboardView(org.jenkinsci.test.acceptance.plugins.dashboard_view.DashboardView) WorkflowMultiBranchJob(org.jenkinsci.test.acceptance.po.WorkflowMultiBranchJob) CoreMatchers(org.hamcrest.CoreMatchers) Arrays(java.util.Arrays) Since(org.jenkinsci.test.acceptance.junit.Since) Issue(org.jvnet.hudson.test.Issue) FindBugsFreestyleSettings(org.jenkinsci.test.acceptance.plugins.findbugs.FindBugsFreestyleSettings) AnalysisAction(org.jenkinsci.test.acceptance.plugins.analysis_core.AnalysisAction) WebElement(org.openqa.selenium.WebElement) WorkflowJob(org.jenkinsci.test.acceptance.po.WorkflowJob) DockerContainerHolder(org.jenkinsci.test.acceptance.docker.DockerContainerHolder) AnalysisGraphConfigurationView(org.jenkinsci.test.acceptance.plugins.analysis_collector.AnalysisGraphConfigurationView) NestedView(org.jenkinsci.test.acceptance.plugins.nested_view.NestedView) Inject(javax.inject.Inject) GitRepo(org.jenkinsci.test.acceptance.plugins.git.GitRepo) Folder(org.jenkinsci.test.acceptance.po.Folder) WarningsPerProjectPortlet(org.jenkinsci.test.acceptance.plugins.analysis_collector.WarningsPerProjectPortlet) Build(org.jenkinsci.test.acceptance.po.Build) AnalysisConfigurator(org.jenkinsci.test.acceptance.plugins.analysis_core.AnalysisConfigurator) Map(java.util.Map) AnalysisPlugin(org.jenkinsci.test.acceptance.plugins.analysis_collector.AnalysisPlugin) ListView(org.jenkinsci.test.acceptance.po.ListView) WithDocker(org.jenkinsci.test.acceptance.junit.WithDocker) AnalysisCollectorColumn(org.jenkinsci.test.acceptance.plugins.analysis_collector.AnalysisCollectorColumn) Description(org.hamcrest.Description) Job(org.jenkinsci.test.acceptance.po.Job) CoreMatchers.containsString(org.hamcrest.CoreMatchers.containsString) WarningsBuildSettings(org.jenkinsci.test.acceptance.plugins.warnings.WarningsBuildSettings) GitBranchSource(org.jenkinsci.test.acceptance.plugins.workflow_multibranch.GitBranchSource) By(org.openqa.selenium.By) Test(org.junit.Test) AnalysisCollectorSettings(org.jenkinsci.test.acceptance.plugins.analysis_collector.AnalysisCollectorSettings) TasksFreestyleSettings(org.jenkinsci.test.acceptance.plugins.tasks.TasksFreestyleSettings) WithCredentials(org.jenkinsci.test.acceptance.junit.WithCredentials) CheckStyleFreestyleSettings(org.jenkinsci.test.acceptance.plugins.checkstyle.CheckStyleFreestyleSettings) FreeStyleJob(org.jenkinsci.test.acceptance.po.FreeStyleJob) AnalysisCollectorAction(org.jenkinsci.test.acceptance.plugins.analysis_collector.AnalysisCollectorAction) NoSuchElementException(org.openqa.selenium.NoSuchElementException) List(java.util.List) MatcherAssert(org.hamcrest.MatcherAssert) Matcher(org.jenkinsci.test.acceptance.Matcher) GitContainer(org.jenkinsci.test.acceptance.docker.fixtures.GitContainer) Matchers(org.jenkinsci.test.acceptance.Matchers) Container(org.jenkinsci.test.acceptance.po.Container) Collections(java.util.Collections) PmdFreestyleSettings(org.jenkinsci.test.acceptance.plugins.pmd.PmdFreestyleSettings) WithPlugins(org.jenkinsci.test.acceptance.junit.WithPlugins) FreeStyleJob(org.jenkinsci.test.acceptance.po.FreeStyleJob) AnalysisCollectorSettings(org.jenkinsci.test.acceptance.plugins.analysis_collector.AnalysisCollectorSettings) Test(org.junit.Test)

Aggregations

Job (org.jenkinsci.test.acceptance.po.Job)55 FreeStyleJob (org.jenkinsci.test.acceptance.po.FreeStyleJob)48 Test (org.junit.Test)45 AbstractJUnitTest (org.jenkinsci.test.acceptance.junit.AbstractJUnitTest)42 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)37 WithPlugins (org.jenkinsci.test.acceptance.junit.WithPlugins)22 ListView (org.jenkinsci.test.acceptance.po.ListView)21 View (org.jenkinsci.test.acceptance.po.View)18 Build (org.jenkinsci.test.acceptance.po.Build)13 WebElement (org.openqa.selenium.WebElement)7 IOException (java.io.IOException)5 GerritTriggerJob (org.jenkinsci.test.acceptance.plugins.gerrit_trigger.GerritTriggerJob)5 GerritTriggerNewServer (org.jenkinsci.test.acceptance.plugins.gerrit_trigger.GerritTriggerNewServer)5 GerritTriggerServer (org.jenkinsci.test.acceptance.plugins.gerrit_trigger.GerritTriggerServer)5 GitScm (org.jenkinsci.test.acceptance.plugins.git.GitScm)5 Since (org.jenkinsci.test.acceptance.junit.Since)4 AnalysisAction (org.jenkinsci.test.acceptance.plugins.analysis_core.AnalysisAction)4 WorkflowJob (org.jenkinsci.test.acceptance.po.WorkflowJob)4 Issue (org.jvnet.hudson.test.Issue)4 Arrays (java.util.Arrays)3