Commit 247b23a8 authored by Michael Suzuki's avatar Michael Suzuki
Browse files

fix to run unit test and integration test

parent d23ce407
Loading
Loading
Loading
Loading
+30 −13
Original line number Diff line number Diff line
@@ -844,6 +844,10 @@
            <executions>
              <execution>
                <id>compile-integration-test</id>
                <!-- 
                     Do not change the phase as it wont compile unless in the right phase so
                     mvn install -Pui-test wont work.
                 -->
                <phase>compile</phase>
                <goals>
                  <goal>testCompile</goal>
@@ -856,28 +860,41 @@
              </execution>
            </executions>
          </plugin>
          <!-- Force to skip unit test -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.17</version>
            <configuration>
              <includes>
                <include>%regex[.Test*[a-z|A-Z].class]</include>
              </includes>
              <excludes>
                <exclude>**/*Test.java</exclude>
              </excludes>
              <skipTests>true</skipTests>
            </configuration>
          </plugin>
          <!-- Run integration test with failsafe, with config to fail build if test failure -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>2.17</version>
            <configuration>
              <testSourceDirectory>src/integration/java</testSourceDirectory>
              <testClassesDirectory>${project.build.directory}/integration-classes</testClassesDirectory>
            </configuration>
            <executions>
              <execution>
              <id>integration-test</id>
                <goals>
                  <goal>integration-test</goal>
                </goals>
              </execution>
              <execution>
                <id>verify</id>
                <goals>
                  <goal>verify</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
      <dependencies>
        <dependency>
          <groupId>org.seleniumhq.selenium</groupId>
          <artifactId>selenium-java</artifactId>
          <version>2.39.0</version>
        </dependency>
    </dependencies>
    </profile>
  </profiles>
</project>