Hi all,
I am blocked at the step of performing integration tests i.e; before launching integration tests I have to deploy my war file to glassfish server.
Thus initially i tried using the following configuration:
<build>
....
....
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.18.1</version>
<executions>
<execution>
<id>integration-tests</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<includes>
<include>.\src\integration-test\java\com\dps\fr\adn\testSyed\integration\IntegrationTest.java</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.glassfish.maven.plugin</groupId>
<artifactId>maven-glassfish-plugin</artifactId>
<version>2.1</version>
<configuration>
<echo>true</echo>
<debug>true</debug>
<glassfishDirectory>${glassfish.directory}</glassfishDirectory>
<domain>
<name>${
glassfish.domain.name}</name>
<host>${glassfish.domain.host}</host>
<adminPort>${glassfish.domain.adminPort}</adminPort>
</domain>
<user>${glassfish.user}</user>
<passwordFile>${glassfish.directory}/glassfish/domains/domain1/config/domain-passwords</passwordFile>
<components>
<component>
<name>${project.artifactId}</name>
<artifact>target/${project.build.finalName}.war</artifact>
</component>
</components>
</configuration>
<executions>
<execution>
<id>start-domain</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start-domain</goal>
</goals>
<configuration>
<fork>true</fork>
</configuration>
</execution>
<execution>
<id>stop-domain</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop-domain</goal>
</goals>
</execution>
</executions>
</plugin>
But it didn't work for me and the build was never ending, In other words, the build just kept running at the step of starting the server.
Thus I tried working out in other way i.e.; I created another build to start the sever and deploy my war file:
Therefore my build pipeline was as follows: maven-package -> start server -> deploy -> integration-tests.
But still the integration-tests are not executed in my fail-safe reports it says Tests-run:0, yet the build is successful.
What is that I am missing out? could someone guide me with this please?
Thanking you in advance,
Shad