Search in sources :

Example 1 with AnalysisCollectorSettings

use of org.jenkinsci.test.acceptance.plugins.analysis_collector.AnalysisCollectorSettings in project acceptance-test-harness by jenkinsci.

the class AnalysisCollectorPluginTest method deselectPluginAndBuild.

private AnalysisCollectorAction deselectPluginAndBuild(AnalysisPlugin plugin, Job job) {
    job.configure();
    AnalysisCollectorSettings publisher = job.getPublisher(AnalysisCollectorSettings.class);
    publisher.checkCollectedPlugin(plugin, false);
    job.save();
    Build build = buildSuccessfulJob(job);
    AnalysisCollectorAction action = new AnalysisCollectorAction(build);
    action.open();
    return action;
}
Also used : Build(org.jenkinsci.test.acceptance.po.Build) AnalysisCollectorAction(org.jenkinsci.test.acceptance.plugins.analysis_collector.AnalysisCollectorAction) AnalysisCollectorSettings(org.jenkinsci.test.acceptance.plugins.analysis_collector.AnalysisCollectorSettings)

Example 2 with AnalysisCollectorSettings

use of org.jenkinsci.test.acceptance.plugins.analysis_collector.AnalysisCollectorSettings 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

AnalysisCollectorAction (org.jenkinsci.test.acceptance.plugins.analysis_collector.AnalysisCollectorAction)2 AnalysisCollectorSettings (org.jenkinsci.test.acceptance.plugins.analysis_collector.AnalysisCollectorSettings)2 Build (org.jenkinsci.test.acceptance.po.Build)2 Arrays (java.util.Arrays)1 Collections (java.util.Collections)1 List (java.util.List)1 Map (java.util.Map)1 Inject (javax.inject.Inject)1 CoreMatchers (org.hamcrest.CoreMatchers)1 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)1 Description (org.hamcrest.Description)1 MatcherAssert (org.hamcrest.MatcherAssert)1 Matcher (org.jenkinsci.test.acceptance.Matcher)1 Matchers (org.jenkinsci.test.acceptance.Matchers)1 DockerContainerHolder (org.jenkinsci.test.acceptance.docker.DockerContainerHolder)1 GitContainer (org.jenkinsci.test.acceptance.docker.fixtures.GitContainer)1 Since (org.jenkinsci.test.acceptance.junit.Since)1 WithCredentials (org.jenkinsci.test.acceptance.junit.WithCredentials)1 WithDocker (org.jenkinsci.test.acceptance.junit.WithDocker)1 WithPlugins (org.jenkinsci.test.acceptance.junit.WithPlugins)1