Java Code Examples for org.apache.maven.it.Verifier#setLogFileName()
The following examples show how to use
org.apache.maven.it.Verifier#setLogFileName() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PlatformJarArchetypeIT.java From alfresco-sdk with Apache License 2.0 | 6 votes |
@Test public void whenGenerateProjectFromArchetypeThenAProperProjectIsCreated() throws Exception { generateProjectFromArchetype(LOGGER); LOGGER.info("---------------------------------------------------------------------"); LOGGER.info("Building the generated project {}", archetypeProperties.getProjectArtifactId()); LOGGER.info("---------------------------------------------------------------------"); // Since creating the archetype was successful, we now want to actually build the generated project executing the integration tests // Execute a purge to ensure old data don't make the test fail ProcessBuilder purge = getProcessBuilder("purge"); purge.start().waitFor(); ProcessBuilder pb = getProcessBuilder("build_test"); pb.start().waitFor(); // Verify the execution of the integration tests of the project were successful Verifier verifier = new Verifier(projectPath); verifier.setAutoclean(false); verifier.setLogFileName(LOG_FILENAME); printVerifierLog("PROJECT BUILD", verifier, LOGGER); verifier.verifyErrorFreeLog(); verifier.verifyTextInLog("Tests run: 5, Failures: 0, Errors: 0, Skipped: 0"); }
Example 2
Source File: AllInOneArchetypeIT.java From alfresco-sdk with Apache License 2.0 | 6 votes |
@Test public void whenGenerateProjectFromArchetypeThenAProperProjectIsCreated() throws Exception { generateProjectFromArchetype(LOGGER); LOGGER.info("---------------------------------------------------------------------"); LOGGER.info("Building the generated project {}", archetypeProperties.getProjectArtifactId()); LOGGER.info("---------------------------------------------------------------------"); // Since creating the archetype was successful, we now want to actually build the generated project executing the integration tests // Execute a purge to ensure old data don't make the test fail ProcessBuilder purge = getProcessBuilder("purge"); purge.start().waitFor(); ProcessBuilder pb = getProcessBuilder("build_test"); pb.start().waitFor(); // Verify the execution of the integration tests of the project were successful Verifier verifier = new Verifier(projectPath); verifier.setAutoclean(false); verifier.setLogFileName(LOG_FILENAME); printVerifierLog("PROJECT BUILD", verifier, LOGGER); verifier.verifyErrorFreeLog(); verifier.verifyTextInLog("Tests run: 5, Failures: 0, Errors: 0, Skipped: 0"); }
Example 3
Source File: StopMojoIntegrationTest.java From app-maven-plugin with Apache License 2.0 | 6 votes |
@Test public void testStopStandard() throws IOException, VerificationException, InterruptedException { Verifier verifier = new StandardVerifier("testStopStandard_start"); verifier.setSystemProperty("app.devserver.port", Integer.toString(serverPort)); // start dev app server verifier.executeGoals(Arrays.asList("package", "appengine:start")); // verify dev app server is up verifier.verifyErrorFreeLog(); assertNotNull(UrlUtils.getUrlContentWithRetries(getServerUrl(), 60000, 100)); // stop dev app server verifier.setLogFileName("testStopStandard.txt"); verifier.setAutoclean(false); verifier.executeGoal("appengine:stop"); // verify dev app server is down verifier.verifyErrorFreeLog(); // wait up to 5 seconds for the server to stop assertTrue(UrlUtils.isUrlDownWithRetries(getServerUrl(), 5000, 100)); }
Example 4
Source File: VertxMojoTestBase.java From vertx-maven-plugin with Apache License 2.0 | 5 votes |
void runPackage(Verifier verifier) throws VerificationException { verifier.setLogFileName("build-package.log"); verifier.executeGoal("package", getEnv()); verifier.assertFilePresent("target/vertx-demo-start-0.0.1.BUILD-SNAPSHOT.jar"); verifier.resetStreams(); }
Example 5
Source File: AbstractStageMojoIntegrationTest.java From app-maven-plugin with Apache License 2.0 | 5 votes |
@Test public void testStageStandard() throws IOException, VerificationException { String projectDir = ResourceExtractor.simpleExtractResources(getClass(), "/projects/standard-project") .getAbsolutePath(); Verifier verifier = new StandardVerifier("testStageStandard"); // execute with staging directory not present verifier.executeGoals(Arrays.asList("package", "appengine:stage")); // verify verifier.verifyErrorFreeLog(); verifier.verifyTextInLog("Detected App Engine standard environment application"); verifier.verifyTextInLog("GCLOUD: "); verifier.assertFilePresent("target/appengine-staging"); verifier.assertFilePresent("target/appengine-staging/WEB-INF"); verifier.assertFilePresent("target/appengine-staging/WEB-INF/web.xml"); verifier.assertFilePresent("target/appengine-staging/app.yaml"); verifier.assertFileMatches( projectDir + "/target/appengine-staging/app.yaml", "(?s).*service: 'standard-project'.*"); // repeat with staging directory present verifier.setLogFileName("testStageStandard_repeat.txt"); verifier.setAutoclean(false); verifier.executeGoal("appengine:stage"); verifier.verifyTextInLog("Deleting the staging directory"); }
Example 6
Source File: CompileMojoIT.java From jspc-maven-plugin with Apache License 2.0 | 5 votes |
protected void testJspc(File testDir) throws VerificationException { Verifier verifier = new Verifier(testDir.getAbsolutePath() ); verifier.setLogFileName("verifier.log"); // verifier.setDebug(true); // verifier.setMavenDebug(true); verifier.executeGoal("clean"); verifier.executeGoal("package"); verifier.verifyErrorFreeLog(); verifier.assertFilePresent("target/jspweb.xml"); verifier.assertFilePresent("target/classes/jsp/index_jsp.class"); }
Example 7
Source File: RunIT.java From vertx-maven-plugin with Apache License 2.0 | 5 votes |
private void run(Verifier verifier, String ... previous) throws VerificationException { verifier.setLogFileName("build-run.log"); ImmutableList.Builder<String> builder = ImmutableList.builder(); builder.add(previous); builder.add("vertx:run"); verifier.executeGoals(builder.build(), getEnv()); }
Example 8
Source File: RedeployIT.java From vertx-maven-plugin with Apache License 2.0 | 5 votes |
private void run(Verifier verifier, String... previous) throws VerificationException { verifier.setLogFileName("build-run.log"); ImmutableList.Builder<String> builder = ImmutableList.builder(); builder.add(previous); builder.add("vertx:run"); verifier.executeGoals(builder.build(), getEnv()); }
Example 9
Source File: SetupIT.java From vertx-maven-plugin with Apache License 2.0 | 5 votes |
private void setup(Verifier verifier, String... params) throws VerificationException { verifier.setLogFileName("build-setup.log"); ImmutableList.Builder<String> builder = ImmutableList.builder(); builder.add("io.reactiverse:vertx-maven-plugin:" + VertxMojoTestBase.VERSION + ":setup"); for (String p : params) { builder.add(p); } verifier.executeGoals(builder.build(), getEnv()); }
Example 10
Source File: RunIT.java From vertx-maven-plugin with Apache License 2.0 | 5 votes |
private void run(Verifier verifier, String ... previous) throws VerificationException { verifier.setLogFileName("build-run.log"); ImmutableList.Builder<String> builder = ImmutableList.builder(); builder.add(previous); builder.add("vertx:run"); verifier.executeGoals(builder.build(), getEnv()); }
Example 11
Source File: VertxMojoTestBase.java From vertx-maven-plugin with Apache License 2.0 | 5 votes |
void runPackage(Verifier verifier) throws VerificationException { verifier.setLogFileName("build-package.log"); verifier.executeGoal("package", getEnv()); verifier.assertFilePresent("target/vertx-demo-start-0.0.1.BUILD-SNAPSHOT.jar"); verifier.resetStreams(); }
Example 12
Source File: RedeployIT.java From vertx-maven-plugin with Apache License 2.0 | 5 votes |
private void run(Verifier verifier, String... previous) throws VerificationException { verifier.setLogFileName("build-run.log"); ImmutableList.Builder<String> builder = ImmutableList.builder(); builder.add(previous); builder.add("vertx:run"); verifier.executeGoals(builder.build(), getEnv()); }
Example 13
Source File: RedeployIT.java From vertx-maven-plugin with Apache License 2.0 | 4 votes |
private void run(Verifier verifier) throws VerificationException { verifier.setLogFileName("build-run.log"); verifier.executeGoals(ImmutableList.of("compile", "vertx:run"), getEnv()); }
Example 14
Source File: RedeployIT.java From vertx-maven-plugin with Apache License 2.0 | 4 votes |
private void run(Verifier verifier) throws VerificationException { verifier.setLogFileName("build-run.log"); verifier.executeGoals(ImmutableList.of("compile", "vertx:run"), getEnv()); }
Example 15
Source File: DebugIT.java From vertx-maven-plugin with Apache License 2.0 | 4 votes |
private void debug(Verifier verifier) throws VerificationException { verifier.setLogFileName("build-run.log"); verifier.executeGoals(ImmutableList.of("compile", "vertx:debug"), getEnv()); }
Example 16
Source File: StartStopMojoIT.java From vertx-maven-plugin with Apache License 2.0 | 4 votes |
private void runStop(Verifier verifier) throws VerificationException, IOException { verifier.setLogFileName("build-stop.log"); verifier.executeGoal("vertx:stop", getEnv()); assertInLog(verifier, "BUILD SUCCESS", "terminated with status 0"); verifier.resetStreams(); }
Example 17
Source File: StartStopMojoIT.java From vertx-maven-plugin with Apache License 2.0 | 4 votes |
private void runStart(Verifier verifier) throws VerificationException, IOException { verifier.setLogFileName("build-start.log"); verifier.executeGoal("vertx:start", getEnv()); assertInLog(verifier, "BUILD SUCCESS", "Starting vert.x application..."); verifier.resetStreams(); }
Example 18
Source File: StartStopMojoIT.java From vertx-maven-plugin with Apache License 2.0 | 4 votes |
private void runStop(Verifier verifier) throws VerificationException, IOException { verifier.setLogFileName("build-stop.log"); verifier.executeGoal("vertx:stop", getEnv()); assertInLog(verifier, "BUILD SUCCESS", "terminated with status 0"); verifier.resetStreams(); }
Example 19
Source File: StartStopMojoIT.java From vertx-maven-plugin with Apache License 2.0 | 4 votes |
private void runStart(Verifier verifier) throws VerificationException, IOException { verifier.setLogFileName("build-start.log"); verifier.executeGoal("vertx:start", getEnv()); assertInLog(verifier, "BUILD SUCCESS", "Starting vert.x application..."); verifier.resetStreams(); }
Example 20
Source File: DebugIT.java From vertx-maven-plugin with Apache License 2.0 | 4 votes |
private void debug(Verifier verifier) throws VerificationException { verifier.setLogFileName("build-run.log"); verifier.executeGoals(ImmutableList.of("compile", "vertx:debug"), getEnv()); }