27

It says in the documentation that the verify phase in the build lifecycle

run any checks on results of integration tests to ensure quality criteria are met

What does this exactly mean?

2 Answers 2

13

The verify phase will indeed verify the integration tests results, if one or more results have failed or not.

How can you run those tests in your Maven?

Usually the maven-failsafe-plugin is used to orchestrate the lifecycle of the integration tests, it has two goals:

  1. failsafe:integration-test runs the integration tests of an application.
  2. failsafe:verify verifies that the integration tests of an application passed.

In the case of the verify goal, as per documentation:

Binds by default to the lifecycle phase: verify.

In the usage section of the documentation you can check some more discussion around the verify for each testing provider it is available

For this particular piece of configuration, the verify will check if some of summary files have any failures:

<execution> 
  <id>verify</id>
  <goals>
    <goal>verify</goal>
  </goals>
  <configuration>
    <summaryFiles>
      <summaryFile>target/failsafe-reports/failsafe-summary-red-bevels.xml</summaryFile>
      <summaryFile>target/failsafe-reports/failsafe-summary-no-bevels.xml</summaryFile>
    </summaryFiles>
  </configuration>
</execution>

Edit 1

Some interesting article can be found in here around the maven configuration for this.

0

Veirfy can also be used by Sonarqube

mvn clean verify sonar:sonar   -Dsonar.projectKey=JWatch   -Dsonar.projectName='JWatch'   -Dsonar.host.url=http://localhost:9000   -Dsonar.token=mytoken

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.