【问题标题】:SoapUI Maven plugin- executing multiple projectsSoapUI Maven 插件——执行多个项目
【发布时间】:2012-02-29 09:20:04
【问题描述】:

我正在将 SoapUI TestRunner 的 Ant 执行转换为使用 maven 插件,但我无法得到关于如何使用此插件执行多个项目的好答案。

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

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

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

Here是我指的帖子。

【问题讨论】:

  • 我遇到了这个问题。我最终编写了自己的 Maven 插件。这很简单。

标签: maven-plugin soapui service-layer automated-tests


【解决方案1】:

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

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

选择权在你。我决定继续使用我的 Ant 执行 soapui。这是一个带有 example 的关于 ant 执行的博客。也许有一天我会开始写我自己的插件。老实说,蚂蚁执行的效果非常好。测试后我用 ant 做了很多事情(执行多个项目,检查失败等)。 Ant 似乎确实为此提供了一个很好的解决方案,Maven 的严格结构对于无论如何都不是真正构建的东西并不是那么好。

【讨论】:

    【解决方案2】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-04-12
      • 1970-01-01
      • 1970-01-01
      • 2022-08-15
      • 2023-04-07
      • 2021-06-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多