Forum Discussion
- nmraoChampion Level 2Would you mind providing more information as possible, like how are you using, what is the issue being faced, which help to assist
- sujatha1Occasional ContributorI have tried to run single testsuite But it is not working
This is my pom file:
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.suj</groupId>
<artifactId>com-company-foo</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>soapui-maven2-plugin</name>
<url>http://maven.apache.org</url>
<build>
<plugins>
<plugin>
<groupId>eviware</groupId>
<artifactId>maven-soapui-pro-plugin</artifactId>
<version>4.5.1</version>
<executions>
<execution>
<id>soap</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<projectFile>${artifactId}-soapui-project.xml</projectFile>
<testSuite>${testSuite}</testSuite>
<outputFolder>MavenSoap</outputFolder>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<pluginRepositories>
<pluginRepository>
<id>eviwarePluginRepository</id>
<url>http://www.soapui.org/repository/maven2/eviware/maven-soapui-pro-plugin</url>
</pluginRepository>
</pluginRepositories>
</project>
and from command prompt:
mvn eviware:maven-soapui-pro-plugin:test -DtestSuite="testsuitename"
still all the testsuites are running - nmraoChampion Level 2Please see this post
viewtopic.php?f=3&t=8701
extract from above link, you seemed to mention testSuite instead of testSuiteName.
<properties>
<testSuiteName>Test Suite 1</testSuiteName>
</properties>
- you can specify test suite on command line, eg.
mvn eviware:maven-soapui-plugin:test -DtestSuiteName="some test suite name" - sujatha1Occasional ContributorEven i tried testSuiteName still not working
- redfish4ktc2Super Contributornmrao the testSuite parameter is right (see the end of the post you have provided and the plugin documentation
)
The problem comes from the plugin configuration. The configuration is only set for the defined execution binded to the test phase. Give a try to mvn clean test -DtestSuite="my-failing-test-suite" (this will fail as the providing testsuite name does not exist, but you will now be sure the parameter is used)
If you want to use the plugin outside of a maven phase, put the configuration outside of the execution definition
I have also some remarks about the pom
- the url of the plugin repository is wrong: it should be http://www.soapui.org/repository/maven2
- you can remove the <testSuite>${testSuite}</testSuite> from the pom. This is undocumented but you have a way to override plugin properties directly from the command line. For the testSuite parameter, use -Dsoapui.testsuite="my-failing-test-suite". Usually, you can use -Dsoapui.<property_name> but sometimes the case is no the same (as for testSuite) or sometimes a completly different value (as for settingsPassword with -Dsoapui.settingfFile.password). You can find all values in the META-INF/maven/plugin.xml in the jar of the maven plugin - sujatha1Occasional Contributorthanks alot its working but all my xpath assertions are failing
- nmraoChampion Level 2redfish4ktc2 thank you for directing correctly. I am really no voice at maven, may be i should have been silent when unsure.
- redfish4ktc2Super Contributor
- sujatha1Occasional ContributorI have added junit dependency then it worked fine.
- redfish4ktc2Super Contributorsujatha1 for my information, you mean that you added a junit dependency to the soapui plugin declaration, then the xpath assertions worked when running maven?
Related Content
- 9 years ago
- 14 years ago
- 11 years ago
Recent Discussions
- 2 days ago
- 5 days ago
- 16 days ago