9 Replies Latest reply on May 1, 2012 10:40 PM by dan.j.allen

    Testing deployment of pre-built .war to various web servers

    jfuerth

      Hi testing enthusiasts,

       

      I'm itching to automate deployment testing of several Errai quickstart projects. Here's what we're doing by hand:

       

      * Launch in Dev Mode and poke at the app (this can be handled already by the tooling we have)

        * Build a WAR and deploy it to Jetty 7, Jetty 8, Tomcat 7, JBoss AS 6, and JBoss AS 7. (Each server has its own Maven profile, so we need to do a clean build for each)

      * Test that "mvn clean" properly deletes all generated files, bringing the project back to its pristine state

       

      HtmlUnit is powerful enough to verify the app deployed correctly. Real browser testing is not important because the quickstarts are not intricately styled.

       

      I feel like Arquillian has probably solved this problem already. Can I use Arquillian to deploy the target/${myapp}.war to an Arquillian Managed container, then load the page and poke at the DOM (fill in a form field, press a button, check for response) with HtmlUnit? It's a different use case than the docs and tutorials focus on: I explicitly don't want to use ShrinkWrap in this case, because the thing I'm testing is that the .war was assembled correctly. I also don't want to inject anything into my test case. I just want to load the page into HtmlUnit and poke at it.

       

      I greatly appreciate any and all ideas about how to automate away this tedious job.

       

      -Jonathan