how to create a SOAP UI project and run requests to it in Java

后端 未结 2 1008
礼貌的吻别
礼貌的吻别 2020-12-30 13:19

I want to create a Java class that will do the following
1. load/create a SOAPUI project using a wsdl.
2. run requests to the operations in that wsdl.

This i

2条回答
  •  天涯浪人
    2020-12-30 13:56

    Rather than programmatically calling SoapUI to run your tests, have you considered using the maven-soapui-pro-plugin ?

    Here's an introduction to Apache Maven, if you need to read about it :)

    Now, given you have a maven project, edit your pom.xml and add a profile similar to the one below. Then you can run maven with -Dsoapuitests, and your SoapUI test suite(s) will run.

        
            soapuitests
            
                
                    
                        eviware
                        maven-soapui-pro-plugin
                        4.5.1
                        
                            
                                soapuitests
                                test
                                
                                    test
                                
                                
                                    http://myserver/myendpoint
                                    
                                        ${project.basedir}/src/test/resources/my-soapui-project.xml
                                    
                                    
                                    
                                    ${project.build.directory}\soapui-logs
                                
                            
                        
                    
                
            
        
    

    I hope this is of help to you, good luck.

提交回复
热议问题