Skip to content

Commit

Permalink
yegor256#200 Migrate s3auth-rest integration tests to CasperJS
Browse files Browse the repository at this point in the history
  • Loading branch information
palyuga committed Jan 6, 2015
1 parent dbd714f commit 6f1b62d
Showing 1 changed file with 116 additions and 0 deletions.
116 changes: 116 additions & 0 deletions s3auth-rest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,122 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.github.klieber</groupId>
<artifactId>phantomjs-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>install</goal>
</goals>
</execution>
</executions>
<configuration>
<version>1.9.2</version>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.3.2</version>
<executions>
<execution>
<id>casperjs-install</id>
<phase>pre-integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>git</executable>
<arguments>
<argument>clone</argument>
<argument>--depth=1</argument>
<argument>https://github.com/n1k0/casperjs.git</argument>
<argument>${project.build.directory}/casperjs</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>tomcat-port</id>
<goals>
<goal>reserve-network-port</goal>
</goals>
<configuration>
<portNames>
<portName>tomcat.port</portName>
</portNames>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.0</version>
<configuration>
<path>/</path>
</configuration>
<executions>
<execution>
<id>start-tomcat</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run-war-only</goal>
</goals>
<configuration>
<port>${tomcat.port}</port>
<fork>true</fork>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>casperjs-test</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${project.build.directory}/casperjs/bin/casperjs</executable>
<workingDirectory>${basedir}</workingDirectory>
<arguments>
<argument>test</argument>
<argument>--verbose</argument>
<argument>--no-colors</argument>
<argument>--concise</argument>
<argument>--home=http://localhost:${tomcat.port}</argument>
<argument>${basedir}/src/test/casperjs</argument>
</arguments>
<environmentVariables>
<PHANTOMJS_EXECUTABLE>${phantomjs.binary}</PHANTOMJS_EXECUTABLE>
</environmentVariables>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<executions>
<execution>
<id>stop-tomcat</id>
<phase>post-integration-test</phase>
<goals>
<goal>shutdown</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
Expand Down

0 comments on commit 6f1b62d

Please sign in to comment.