小编Ant*_*jev的帖子

我如何获得readyapi(以前称为soapui)来尊重我在pom.xml中指定的值?

我的pom.xml看起来像这样

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.cvent</groupId>
    <artifactId>soa-readyapi</artifactId>
    <packaging>pom</packaging>
    <version>1.0-SNAPSHOT</version>
    <name>OnSite Solutions ReadyAPI Tests</name>
    <properties>
        <soapui.environment/>
        <soapui.test-suite/>
        <soapui.test-case/>
    </properties>
    <build>
        <plugins>
            <plugin>
                <groupId>com.smartbear</groupId>
                <artifactId>ready-api-maven-plugin</artifactId>
                <version>1.2.1</version>
                <executions>
                    <execution>
                        <phase>test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <projectFile>${soapui.projectFile}</projectFile>

                            <iface>IOrderService</iface>
                            <tool>wsi,axis1,axis2</tool>
                            <settingsFile>soapui-settings.xml</settingsFile>
                            <!-- <environment>${soapui.environment}</environment> -->
                            <outputFolder>output</outputFolder>
                            <junitReport>true</junitReport>
                            <printReport>true</printReport>
                            <projectProperties>
                                <value>one_api="https://someurl:4000"</value>
                                <value>two_api="https://someurl:4001"</value>
                                <!-- <value>environment=${soapui.environment}</value> -->
                            </projectProperties>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
Run Code Online (Sandbox Code Playgroud)

当我尝试使用以下命令运行此项目时 -

mvn clean test -Dsoapui.projectFile=smokeTest
Run Code Online (Sandbox Code Playgroud)

测试似乎与ReadyAPI中设置的最后一个活动环境一起运行.它忽略了

   <value>one_api="https://someurl:4000"</value>
   <value>two_api="https://someurl:4001"</value>
Run Code Online (Sandbox Code Playgroud)

我知道我可以使用环境功能来做到这一点,但这对我当前的用例没有帮助.我想在运行时设置它,现在我正在硬编码pom.xml,看看它是否可行,但它没有.

关于为什么readyAPI忽略我在pom.xml中设置的值的任何想法?

谢谢

soapui maven ready-api

11
推荐指数
1
解决办法
534
查看次数

标签 统计

maven ×1

ready-api ×1

soapui ×1