SoapUI Maven plugin- executing multiple projects

后端 未结 2 989
青春惊慌失措
青春惊慌失措 2021-01-05 12:01

I am working on converting an Ant execution of the SoapUI TestRunner to use the maven plugin and I cannot get a good answer on how to execute multiple projects using this pl

相关标签:
2条回答
  • 2021-01-05 12:13

    In addition to that in above this is an example code block for it.

    <build>
            <plugins>
                <plugin>
                    <groupId>com.github.redfish4ktc.soapui</groupId>
                    <artifactId>maven-soapui-extension-plugin</artifactId>
                    <version>4.6.4.1</version>
                    <executions>
                        <execution>
                            <id>soapUI1</id>
                            <phase>test</phase>
                            <goals>
                                <goal>test-multi</goal>
                            </goals>
                            <configuration>
                                <projectFiles>
                                    <scan>
                                        <baseDirectory>/home/waruna/workspace/soapuitest/src/main/resources/projects</baseDirectory>
                                        <includes>
                                            <include>*.xml</include>
                                        </includes>
                                        <excludes>
                                            <exclude>**/*fail-*-soapui-project.xml</exclude>
                                            <exclude>**/composite-projects/**</exclude>
                                        </excludes>
                                    </scan>
                                </projectFiles>
                                <outputFolder>/home/waruna/workspace/soapuitest/src/main/resources/</outputFolder>
                                <junitReport>true</junitReport>
                                <useOutputFolderPerProject>true</useOutputFolderPerProject>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    
    0 讨论(0)
  • 2021-01-05 12:22

    Well I haven't gotten much of an answer anywhere. So if you find this question here are your options.

    • Multiple executions of the plugin
    • Write a script to envoke maven multiple times
    • Build your own maven plugin
    • Use Ant to execute the testrunner.bat

    The choice is yours. I've decided to keep on using my Ant execution of soapui. Here is a blog with an example of the ant execution. Maybe one of these days i'll get around to writing my own plugin. To be honest, the ant execution works really well. I've used ant to do a number of things after the tests (execute multiple projects, check for failures, etc). Ant does seem to offer a nice solution to this, Maven's strict structure isn't really that great for something that isn't really a build anyway.

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