【问题标题】:Running soapUI tests with maven plugin使用 maven 插件运行 soapUI 测试
【发布时间】:2017-10-09 11:43:21
【问题描述】:

我在 .xml 中有我的 soapUI 项目。我现在想将我的项目更改为 maven 构建,以便我可以将其集成为我日常构建的一部分。我试图获取有关如何集成 maven 和 soapUI 的一些信息。但没有任何效果。

我想知道如何使用 maven 插件来运行我现有的肥皂项目

【问题讨论】:

    标签: soapui maven-plugin


    【解决方案1】:

    您可以通过以下链接开始。 它有一步一步和 pom.xml 示例从它开始。

    https://support.smartbear.com/readyapi/docs/testing/integrations/ci-systems/maven/working.html

    希望这会对您有所帮助,如果您有任何特定错误,您可以在此处发布错误跟踪。

    谢谢

    【讨论】:

    • 您好,感谢您的回答。我现在有 pom.xml,其中包含插件详细信息和 soap 项目以及几个依赖项。我的构建也成功运行。但我在控制台中看到以下消息 --- maven-compiler-plugin:3.6.0:testCompile (default-testCompile) @ webservice --- 无需编译 - 所有类都是最新的 --- maven-surefire-plugin :2.15:test (default-test) @webservice --- 没有要运行的测试。这是什么意思?
    • 这需要使用专业版,所以不是免费版。
    【解决方案2】:
    Use below plugin
    <plugin>
       <groupId>com.smartbear.soapui</groupId>
       <artifactId>soapui-maven-plugin</artifactId>
       <version>5.0.0</version>
    
       <!– Change the name to identify –>
       <configuration>
          <projectFile>src/test/resources/soapui/Soapui-auto-soapui-project.xml</projectFile>
          <!– Change the project file name –>
          <outputFolder>target/surefire-reports</outputFolder>
          <!– Change the suite name –>
          <junitReport>true</junitReport>
          <exportwAll>true</exportwAll>
          <printReport>true</printReport>
          <testFailIgnore>false</testFailIgnore>
          <projectProperties>
             <value>EnvName=${soapUiEnv}</value>
             <value>ServiceEndPoint=${ServiceEndPoint}</value>
             <value>TestReportPath=${project.build.directory}/surefire-reports/</value>
          </projectProperties>
          <soapuiProperties>
             <property>
                <name>soapui.properties</name>
                <value>src/test/resources/soapui/soapui-auto_data.properties</value>
             </property>
          </soapuiProperties>
       </configuration>
    </plugin>
    
    You need to create a test suite and copy it to "src/test/resources/soapui/".
    specify the path in project file tag and to execute the tests to running application run command "mvn com.smartbear.soapui:soapui-maven-plugin:5.0.0:test -DServiceEndPoint=http://localhost:8080"
    
    You can refer below blog post, explained with example soap automation using maven plugin for spring boot application https://kodestacked.com/soap-ui-automation-using-maven-plugin-in-spring-boot/
    

    【讨论】:

    • 请添加代码说明,以便其他人可以从您的回答中受益。唯一的代码答案不会带来太多,也没有真正的意义
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-01-12
    • 2023-03-10
    • 1970-01-01
    • 2012-04-12
    • 2015-06-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多