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

后端 未结 2 994
礼貌的吻别
礼貌的吻别 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:33

    Finally I am able to solve this. I am creating a SoapUI project, saving it and sending requests all via code. Please refer to link here for complete details. Thanks.

    0 讨论(0)
  • 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.

        <profile>
            <id>soapuitests</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>eviware</groupId>
                        <artifactId>maven-soapui-pro-plugin</artifactId>
                        <version>4.5.1</version>
                        <executions>
                            <execution>
                                <id>soapuitests</id>
                                <phase>test</phase>
                                <goals>
                                    <goal>test</goal>
                                </goals>
                                <configuration>
                                    <endpoint>http://myserver/myendpoint</endpoint>
                                    <projectFile>
                                        ${project.basedir}/src/test/resources/my-soapui-project.xml
                                    </projectFile>
                                    <projectProperties>
                                    </projectProperties>
                                    <outputFolder>${project.build.directory}\soapui-logs</outputFolder>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    

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

    0 讨论(0)
提交回复
热议问题