Check if application is up in the maven pre-integration-test phase?

278 views Asked by At

I am making my application up in the pre-integration-test phase and then the integration test cases run using the failsafe plugin. I want to ensure that my application is up and running in the pre-integration-test phase before the integration test cases are executed.

I got two probable ways to achieve this :

  1. Maven-antrun-plugin
<waitfor maxwait="100" maxwaitunit="second" checkevery="500">
    <http url="https://localhost/myapp/index.html"/>
</waitfor>
  1. exec-maven-plugin
            
          <execution>
            <id>wait</id>
            <phase>pre-integration-test</phase>
            <configuration>
              <executable>sleep</executable>
              <arguments>
                <argument>100</argument>
              </arguments>
            </configuration>
            <goals>
              <goal>exec</goal>
            </goals>
          </execution>

Is there any other way to achieve this OR any other maven plugin to achieve the same functionality ?

0

There are 0 answers