Reputation: 5317
We have a set of soapui tests that are being run via a maven project using the soapui maven plugin which is run by a Jenkins job as well.
As we have various environments we pass a "host" parameter via the environment, from Jenkins to the Maven build.
There is a <host>${HOST}</host>
element that allows us to configure the host. The problem is that the maven plugin seems to dislike when adding the protocol prefix inside the parameter value:
<host>example.com</host>
Will work
<host>https://example.com</host>
Won't work (java.net.UnknownHostException: https)
So if I am not allowed to provide the protocol prefix, then I don't know how to tell the maven soapui plugin that the host is using ssl.
Here is the configuration in the pom.xml that we are using:
<build>
<plugins>
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-pro-maven-plugin</artifactId>
<version>5.0.0</version>
<dependencies>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>sqljdbc4</artifactId>
<version>4.0</version>
</dependency>
</dependencies>
<configuration>
<projectFile>${project.build.directory}/test-classes/my-soapui-project.xml</projectFile>
<host>${HOST}</host>
<junitReport>true</junitReport>
<soapuiProperties>
<property>
<name>soapui.logroot</name>
<value>${project.build.directory}/soapui-logs/</value>
</property>
</soapuiProperties>
<outputFolder>${project.build.directory}/soapui-output</outputFolder>
</configuration>
<executions>
<execution>
<id>first-tests</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<testSuite>first-TestSuite</testSuite>
</configuration>
</execution>
<execution>
<id>second-tests</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<testSuite>second-TestSuite</testSuite>
</configuration>
</execution>
</executions>
</plugin>
...
Edited: Based in the answer by Bistro:
Instead of using <host>${HOST}</host>
I now use <endpoint>${HOST}</endpoint>
it does the trick.
Upvotes: 0
Views: 815