SoapUI Maven Project Properties POM not working
Hi all!
I have setup my SoapUI (v5.4) project initially at first with properties defined at the project level and successfully pass them down to the test suites, no problem. I have set up maven on my local and am able to successfully execute the SoapUI tests via soapui-maven-plugin (SmartBear version). I am now attempting to further add another layer of properties by adding the project properties to the POM file for Maven, however nothing is working for me. I am using SoapUI Open Source with the latest Maven. I am using SoapUI v4.6 through maven since I started with the example POM from the SoapUI doc site. I will take one property for example below.
The methods I have tried:
<projectProperties>
<projectProperty>jdbcUsername=username</projectProperty>
</projectProperties>
<projectProperties>
<value>jdbcUsername=username</value>
</projectProperties>
<globalProperties>
<globalProperty>jdbcUsername=username</globalProperty>
</globalProperties>
<globalProperties>
<value>jdbcUsername=username</value>
</globalProperties>
I've tried all these with and without double and single quotes. In my SoapUI project, the property is setup at the project level as jdbcUsername with a blank value. I've also tried this with ${#Project#jdbcUsername}. I also tried all of these variations at the Global level as well. I have also tried according to the solution found here and here with no success. I've followed all documentation on the soapui site and in the forums. I know my jdbc jar is working because I can set property values within SoapUI GUI and it will execute fine through Maven, but once I abstract them from SoapUI and set them in the POM file, the jdbc driver returns error message:
Login failed for user ''.
This is how I can tell the properties from the POM file are not making it into the project's properties I have set. Is it required to have the property created in SoapUI at the project level? Either way, I tried it without. I feel like I've tried everything.
ANY help is appreciated. Thanks!
Update:
Finally figured it out. I moved the <configuration> tag in my pom.xml outside of the <execution> node but still within the <plugin> node like this:
<plugin> <groupId>com.smartbear.soapui</groupId> <artifactId>soapui-maven-plugin</artifactId> <version>5.4.0</version> <configuration> <projectFile>xxx-soapui-project.xml</projectFile> <printReport>true</printReport> <testFailIgnore>false</testFailIgnore> <projectProperties> <value>jdbcUsername=xxx</value> </projectProperties> </configuration> <dependencies> <dependency> <groupId>xxx</groupId> <artifactId>xxx</artifactId> <version>xxx</version> </dependency> </dependencies> <executions> <execution> <goals> <goal>test</goal> </goals> <phase>test</phase> </execution> </executions> </plugin>
After this, everything worked.
Documentation should be updated!!! Hope this helps others.
Thanks