Ask a Question

Running single testsuite from maven cmd line

HammerTime
Occasional Contributor

Running single testsuite from maven cmd line

Hello,

I am trying to figure out how to run just one of the testsuites in my project from the maven cmd line.

I have tried putting the testSuite property in the pom, but am having no joy passing the required testsuite name on the cmd line.

thanks
4 REPLIES 4
redfish4ktc2
Super Contributor

Hi,
I've you try -Dsoapui.testSuite=suiteName
HammerTime
Occasional Contributor

Thanks

I figured out that putting this in the pom:
<testSuite>${testSuite}</testSuite>

And then use the following to run a single testsuite
-DtestSuite="testSuiteName"

but not providing this would still run all of the testsuites

thanks
redfish4ktc2
Super Contributor

@HammerTime
yes, you're right, the configuration you state in your previous post works because the soapui test runner run all suites when the testSuite parameter is null (ie when you don't provide -DtestSuite="testSuiteName" in the command line)

Also, if you had configured the pom like this:
<testSuite>${a_property_name}</testSuite>

you should have use:
-Da_property_name="testSuiteName"

This means, you use the maven way to pass property to the pom.

The way I proposed you in my previous post is related to the soapui maven plugin implementation. This is undocumented.
For almost all parameters, you can provide/override parameter value with
-Dsoapui.<parameter_name>=paramValue

You can check this in the META-INF/maven/plugin.xml file in the maven-soapui-plugin.jar

Hello @redfish4ktc2 could we use testsuite or testcase custom property to run specific test case/suite?

not based on testSuite name in maven project?

cancel
Showing results for 
Search instead for 
Did you mean: