Search in sources :

Example 21 with MavenModuleSet

use of org.jenkinsci.test.acceptance.plugins.maven.MavenModuleSet in project acceptance-test-harness by jenkinsci.

the class MavenPluginTest method useWithTasks.

@Issue("JENKINS-22252")
@WithPlugins({ "maven-plugin@2.12", "tasks" })
@Test
public void useWithTasks() throws InterruptedException {
    MavenInstallation.installMaven(jenkins, "Maven 3.2.x", "3.2.1");
    MavenModuleSet job = jenkins.jobs.create(MavenModuleSet.class);
    job.configure();
    job.copyDir(resource("/maven_plugin/multimodule/"));
    job.goals.set("package");
    job.addBuildSettings(TasksMavenSettings.class);
    job.save();
    Build build = job.startBuild().shouldSucceed();
    assertThat(build.getConsole(), not(containsString("IllegalAccessError")));
}
Also used : MavenBuild(org.jenkinsci.test.acceptance.plugins.maven.MavenBuild) Build(org.jenkinsci.test.acceptance.po.Build) MavenModuleSet(org.jenkinsci.test.acceptance.plugins.maven.MavenModuleSet) 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 22 with MavenModuleSet

use of org.jenkinsci.test.acceptance.plugins.maven.MavenModuleSet in project acceptance-test-harness by jenkinsci.

the class CheckStylePluginTest method should_group_warnings_by_module.

/**
 * Builds a multi-module maven project and checks that warnings are grouped by module.
 */
// TODO: Check module details
@Test
public void should_group_warnings_by_module() {
    MavenModuleSet job = createMavenJob(CHECKSTYLE_PLUGIN_ROOT + "maven_multi_module", "clean package checkstyle:checkstyle", CheckStyleMavenSettings.class, new NullConfigurator<>());
    Node slave = createSlaveForJob(job);
    Build build = buildSuccessfulJobOnSlave(job, slave);
    assertThatCheckStyleResultExists(job, build);
    build.open();
    CheckStyleAction checkstyle = new CheckStyleAction(build);
    checkstyle.open();
    assertThat(checkstyle.getNumberOfNewWarnings(), is(24));
    assertThatModulesTabIsCorrectlyFilled(checkstyle);
}
Also used : CheckStyleAction(org.jenkinsci.test.acceptance.plugins.checkstyle.CheckStyleAction) Build(org.jenkinsci.test.acceptance.po.Build) Node(org.jenkinsci.test.acceptance.po.Node) MavenModuleSet(org.jenkinsci.test.acceptance.plugins.maven.MavenModuleSet) Test(org.junit.Test)

Aggregations

MavenModuleSet (org.jenkinsci.test.acceptance.plugins.maven.MavenModuleSet)22 Test (org.junit.Test)21 AbstractJUnitTest (org.jenkinsci.test.acceptance.junit.AbstractJUnitTest)9 Build (org.jenkinsci.test.acceptance.po.Build)7 DockerTest (org.jenkinsci.test.acceptance.junit.DockerTest)5 Issue (org.jvnet.hudson.test.Issue)5 WithPlugins (org.jenkinsci.test.acceptance.junit.WithPlugins)4 CheckStyleAction (org.jenkinsci.test.acceptance.plugins.checkstyle.CheckStyleAction)2 MavenBuild (org.jenkinsci.test.acceptance.plugins.maven.MavenBuild)2 Matchers.containsString (org.hamcrest.Matchers.containsString)1 ArtifactoryContainer (org.jenkinsci.test.acceptance.docker.fixtures.ArtifactoryContainer)1 MailhogContainer (org.jenkinsci.test.acceptance.docker.fixtures.MailhogContainer)1 ArtifactoryPublisher (org.jenkinsci.test.acceptance.plugins.artifactory.ArtifactoryPublisher)1 FindBugsAction (org.jenkinsci.test.acceptance.plugins.findbugs.FindBugsAction)1 JobConfigHistory (org.jenkinsci.test.acceptance.plugins.job_config_history.JobConfigHistory)1 Change (org.jenkinsci.test.acceptance.plugins.job_config_history.JobConfigHistory.Change)1 Mailer (org.jenkinsci.test.acceptance.plugins.mailer.Mailer)1 MavenModule (org.jenkinsci.test.acceptance.plugins.maven.MavenModule)1 MavenModuleBuild (org.jenkinsci.test.acceptance.plugins.maven.MavenModuleBuild)1 MavenProjectConfig (org.jenkinsci.test.acceptance.plugins.maven.MavenProjectConfig)1