SoapUI Maven 插件 - 执行多个项目

发布于 2025-01-03 14:32:16 字数 446 浏览 0 评论 0原文

我正在努力将 SoapUI TestRunner 的 Ant 执行转换为使用 Maven 插件,但我无法获得有关如何使用此插件执行多个项目的良好答案。

我在 Smartbear 论坛上发现了 2010 年的一篇论坛帖子,其中列出了一些方法,但似乎没有一个非常可行(编写一些脚本来使用不同的参数调用 Maven 或为每个项目添加执行)。

是否有解决此问题的最佳实践?或者有没有人看到这个问题的创造性解决方案?

我猜这是一个大规模的问题...

这里是我引用的帖子。

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

I found a forum post from 2010 on the Smartbear forum and there are a few approaches listed but none seem very workable (writing some script to invoke maven with different parameters or adding an execution for every project).

Are there any best practices for working around this? Or has anyone seen an inventive solution to this problem?

I would guess that this is a large scale problem...

Here is the post I am refering to.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

著墨染雨君画夕 2025-01-10 14:32:16

好吧,我在任何地方都没有得到太多答案。因此,如果您发现这个问题,这里就是您的选择。

  • 插件的多次执行
  • 编写脚本多次调用 maven
  • 构建您自己的 maven 插件
  • 使用 Ant 执行 testrunner.bat

选择权在您。我决定继续使用我的 Soapui 的 Ant 执行。这是一个带有 ant 执行的示例。也许有一天我会抽出时间来编写我自己的插件。说实话,蚂蚁的执行效果确实很好。我在测试后使用 ant 做了很多事情(执行多个项目、检查失败等)。 Ant 似乎确实为此提供了一个很好的解决方案,Maven 严格的结构对于那些实际上不是构建的东西来说并不是那么好。

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.

韶华倾负 2025-01-10 14:32:16

除了上面的内容之外,这是一个示例代码块。

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

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>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文