Forum Discussion

joyedele's avatar
16 years ago

Utilizing the Maven2 Plugin

I am currently using the SoapUI gui to create and test our deployed web services and have been asked to look into integrating the test cases with our builds using maven. 

Now this may be more of a maven question than a soap ui question, but is there a way to run the tests on the code that has just been built? I added the necessary information to my pom and ran mvn install.  The tests were executed, but it wasn't against the current code base, I think it was against what is already deployed on the app server.

At first I didn't understand how SOAP UI could test the web service w/o having it deployed to the app server first, but I thought maybe this was possible.

Sorry for rambling, but here's what I'm looking for in a nutshell:

  • a way to incorporate the soap ui tests in the maven build process

  • the soap-ui test cases to be executed against the current code base


If anyone has experience with this please share your ideas on how to accomplish this if it's even possible.  I am also looking for any best practices for the soap-ui/maven integration process.

Thank you in advance for your help.
  • Hi, I am using the plugin after starting a local jetty in the maven integration-test phase. That means the folowing pom-snipped works by calling mvn integration-test -Psoap-test in my war-goaled application.
    Hope it helps.

       
          soap-test
         
            true
            ${basedir}/src/test/jetty/extraclasspath/ojdbc-14.jar
         

         
           
             
                org.codehaus.mojo
                build-helper-maven-plugin
               
                 
                   
                      reserve-network-port
                   

                    pre-integration-test
                   
                     
                        webserver.port
                        jetty.stop.port
                     

                   

                 

               

             

             
                org.mortbay.jetty
                maven-jetty-plugin
               
                 
                   
                      catalina.base
                      ${project.build.directory}/work
                   

                 

                  secureStopKey
                  ${jetty.stop.port}
                 
                    /contextpath
                    ${project.build.directory}/work
                    ${jetty.extra.classpath}
                 

                  ${jetty.daemon}
                 
                   
                      ${webserver.port}
                      60000
                   

                 

                  ${war.path}
                  0
               

               
               

               
                 
                    start-jetty
                    pre-integration-test
                   
                      run-war
                   

                 

                 
                    stop-jetty
                    post-integration-test
                   
                      stop
                   

                 

               

             

             
                eviware
                maven-soapui-plugin
               
                 
                    soapui-tests
                    integration-test
                   
                     
                        ${soapuiproject}
                     

                      ${project.build.directory}/soapui
                      false
                      false
                      false
                      localhost:${webserver.port}
                   

                   
                      test