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
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.
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.