Skip to content

Conversation

AlexanderTang
Copy link

… test failures to fail maven build during verify phase; requires a verify execution phase

Summary

Test failures during the integration-test phase causes build to fail before post-integration-test can be carried out. Adding the testFailureIgnore flag is insufficient as it solves the above problem, but allows the build to print SUCCESS even when tests fail.

This pull request adds another option: parameter integrationTestFailureAfterPostIntegration still logs the failures during integration-test phase but only fails the build during the verify phase. This allows the post-integration-test phase to finish.

The downside to this implementation is that an execution with verify phase is required, even it this phase doesn't do anything functionally. A working example is:

    <execution>
        <id>npm run integration tests</id>
        <goals>
            <goal>npm</goal>
        </goals>
        <phase>integration-test</phase>
        <configuration>
            <arguments>run e2e</arguments>
            <integrationTestFailureAfterPostIntegration>true</integrationTestFailureAfterPostIntegration>
        </configuration>
    </execution>
    <execution>
        <id>fail any integration tests</id>
        <goals>
            <goal>npm</goal>
        </goals>
        <phase>verify</phase>
        <configuration>
            <arguments>-version</arguments>
        </configuration>
    </execution>

Tests and Documentation

Documentation updated to 1.9.2

… test failures to fail maven build during verify phase; requires a verify execution phase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant