Skip to content

Commit

Permalink
Add possibility to run callTomcat.sh from gui-tests in oder to check …
Browse files Browse the repository at this point in the history
…is tomcat setuped or not
  • Loading branch information
artbez committed Nov 8, 2016
1 parent 659b460 commit 909b31a
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ before_install:
install:
#install and run tests
- mvn install -P travis
- cd UI-testing
- cd ui-testing
- mvn install -DskipTests
- cd ..

Expand Down Expand Up @@ -79,7 +79,7 @@ script:

- ../Travis/callTomcat.sh

- cd ../UI-testing
- cd ../ui-testing
- mvn test -P travis &
- sleep 30

Expand Down
6 changes: 3 additions & 3 deletions Travis/callTomcat.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
iter=1
all=120
until [ "`curl --silent --show-error --connect-timeout 1 -I http://localhost:8080/auth | grep '302 Found'`" != "" ];
until [ "`curl --silent --show-error --connect-timeout 1 -I http://localhost:"${1:-"8080"}"/auth | grep '302 Found'`" != "" ];
do
if [ "$iter" -lt "$all" ]
then
Expand All @@ -16,7 +16,7 @@ done
echo "auth-service found"
iter=1
all=120
until [ "`curl --silent --show-error --connect-timeout 1 -I http://localhost:8082/dashboard | grep '302 Found'`" != "" ];
until [ "`curl --silent --show-error --connect-timeout 1 -I http://localhost:"${2:-"8082"}"/dashboard | grep '302 Found'`" != "" ];
do
if [ "$iter" -lt "$all" ]
then
Expand All @@ -31,7 +31,7 @@ done
echo "dashboard-service found"
iter=1
all=120
until [ "`curl --silent --show-error --connect-timeout 1 -I http://localhost:8081/editor | grep '302 Found'`" != "" ];
until [ "`curl --silent --show-error --connect-timeout 1 -I http://localhost:"${3:-"8082"}"/editor | grep '302 Found'`" != "" ];
do
if [ "$iter" -lt "$all" ]
then
Expand Down
29 changes: 29 additions & 0 deletions ui-testing/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
<relativePath>../pom.xml</relativePath>
</parent>

<properties>
<scanner>true</scanner> <!-- default -->
</properties>

<build>

<resources>
Expand Down Expand Up @@ -44,6 +48,31 @@
<target>1.8</target>
</configuration>
</plugin>

<plugin>
<artifactId>exec-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<executions>
<execution><!-- Run our version calculation script -->
<id>Check services</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<skip>${scanner}</skip>
<executable>${basedir}/../Travis/callTomcat.sh</executable>
<arguments>
<argument>8080</argument>
<argument>8080</argument>
<argument>8080</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>


</plugins>
</build>
<dependencies>
Expand Down
1 change: 0 additions & 1 deletion ui-testing/UI-testing.iml → ui-testing/ui-testing.iml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.4" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.codeborne:selenide:4.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.seleniumhq.selenium:selenium-java:3.0.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.seleniumhq.selenium:selenium-chrome-driver:3.0.0" level="project" />
Expand Down

0 comments on commit 909b31a

Please sign in to comment.