I'm using TeamCity 8.1.5 (build 30240) as our CI server. Gradle 2.1 is the build tool. I'm having a problem with deploying and testing the generated WAR.
I have a web application (Java) which has some associated Protractor based UI tests. What I would like to acheive is this:
1. Thru TeamCity, get Gradle to build the website into a WAR file (works)
2. Thru TeamCity, get Gradle to deploy the above WAR into an instance of Jetty (works, but TeamCity will not proceed to the next step)
3. Get TeamCity to start Protactor tests on the deployed website.
4. Get TeamCity to bring down the Jetty instance after step 3 completes.
What I have tried is this:
1. Create a Gradle build step for the 'build' task --> to create the WAR.
2. Create a Gradle build step for the 'jettyRunWar' task --> to deploy the WAR into an instance of Jetty.
3. Create a command line build step to start the Protactor tests (alternative ways to do this are welcome)
4. Create a Gradle build step fpr the 'jettyStop' task --> to bring down the Jetty instance started in step 2.
The problem is that TeamCity does not progress beyond the 'jettyRunWar' step ... it keeps "Running..." during this step. At this point the website is hosted in Jetty correctly and Protractor can be run on it manually. However, I'd like to get the Protractor tests to run automatically after the website is launched in Jetty. But i cannot do this because TeamCity will not progress beyond the 'jettyRunWar' step.
Any help on how to get this to work will be much appreciated!
Please let me know if there's any information i can share which would make the problem and its solution clearer.