我想知道是否有办法通过将值作为命令行参数传递来覆盖soapui-settings.XML文件中的全局属性值。这是参考使用soapUI pro maven插件而不是使用soapUI的命令行版本。
答案 0 :(得分:0)
您必须使用Maven属性作为中介。
确定SoapUI插件:
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-pro-maven-plugin</artifactId>
<version>.....</version>
<executions>
<execution>
<configuration>
<projectFile>.....</projectFile>
<projectProperties>
<value>property1=${soapui.value1}</value>
</projectProperties>
</configuration>
</execution>
</executions>
</plugin>
你的pom中定义属性:
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<soapui.value1>soapui.actual.value</soapui.value1>
</properties>
然后你可以从命令行调用它,如:
mvn -Dsoapui.value1=soapui.other.value com.smartbear.soapui:soapui-pro-maven-plugin:test