amir
10 years agoNew Contributor
How can I set testsuite property in maven like we set project property in projectProperty tag?
Hi,
I want to set testsuite level property in maven
something like,
<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>src.main.resources</groupId>
<artifactId>soapui-maven2-plugin</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>Maven 2 soapUI Sample</name>
<url>http://maven.apache.org</url>
<pluginRepositories>
<pluginRepository>
<id>smartbear-sweden-plugin-repository</id>
<url>http://www.soapui.org/repository/maven2/</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-maven-plugin</artifactId>
<version>5.1.0</version>
<configuration>
<projectFile>Offline-soapui-project.xml</projectFile>
<junitReport>true</junitReport>
<outputFolder>${project.build.directory}/reports</outputFolder>
<testSuite>SmokeTestSuite</testSuite>
<testSuiteProperties>
<testSuiteProperty>serviceEndpoint=${serviceEndpoint}</testSuiteProperty>
</testSuiteProperties>
</configuration>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
so that when I run soapui project from command line and pass testsuite property value as
mvn - test -DserviceEndpoint=http://some_url
it should set testsuite property in the soapui project.
Any help would be greatly appreciated.
Thanks
Could you please check the approaches mentioned in the below links helps,
https://github.com/redfish4ktc/maven-soapui-extension-plugin/wiki/Tips
Thanks,
Kondasamy