title: Integration testing of multi-war application in Spring Boot
body: <p>I have an application composed of multiple maven war projects.</p>
  
  <p>I have another maven project that runs JUnit integration tests against the manually-started tomcat-deployed multi-war application using org.springframework.web.client.RestTemplate calls.</p>
  
  <p>However, I'd like my integration test project to actually start my multi-war application (once for the duration of the entire suite) before it runs my tests...in spring-boot!</p>
  
  <p>From my integration test project, I'd like to be able to run all the war projects together as a spring-boot application, each with their own contextPaths (e.g. localhost:8080/a for project 'a', localhost:8080/b for project 'b', etc. ), and without changing the original war projects (that are not (yet) spring-boot aware). If I can't make these projects run from my integration test project in spring-boot without changing them then I'd at least like to minimize the use of spring-boot dependencies and configuration in packaged war files...as much as possible.</p>
  
  <p>I was able to get my integration test project to depend on a single war project, start it up and run tests against it...but I was unsuccessful getting two war projects running together in spring-boot under separate contextPaths.</p>
  
  <p>Any suggestions would be welcome!</p>
  
  <p>Here are some of the resources I've been using to put this together:</p>
  
  <ul>
  <li><p>(Spring-boot documentation) <a href="http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-testing.html" rel="noreferrer">http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-testing.html</a></p></li>
  <li><p>(Blog post touching on starting spring app once for test suite) <a href="http://www.nurkiewicz.com/2010/12/speeding-up-spring-integration-tests.html" rel="noreferrer">http://www.nurkiewicz.com/2010/12/speeding-up-spring-integration-tests.html</a></p></li>
  <li><p>(Suggestions for including war files as dependencies in a integration test project pom) <a href="http://eureka.ykyuen.info/2009/10/30/maven-dependency-on-jarwar-package/" rel="noreferrer">http://eureka.ykyuen.info/2009/10/30/maven-dependency-on-jarwar-package/</a></p></li>
  </ul>