Oki I think I was able to find almost the answer. There is just one small problem left, whereI need help
As you can see below testSuite and testCase can be empty and everything will be executed.
If I try the same for the tags I get NPE in Maven.
So is there a way to keep this "<tags><param>${useTag}</param></tags>" empty?
My pom looks now like this:
<configuration>
<!--<globalProperties> <value>preemptive=true</value> </globalProperties> -->
<projectFile>flexibill_project</projectFile>
<printReport>false</printReport>
<outputFolder>${project.build.directory}/soapui</outputFolder>
<junitReport>true</junitReport>
<exportAll>true</exportAll>
<readyApiProperties>
<property>
<name>soapui.logroot</name>
<value>${project.build.directory}/soapui-logs/</value>
</property>
</readyApiProperties>
<environment>${env}</environment>
<testSuite>${testSuite}</testSuite>
<testCase>${testCase}</testCase>
<tags><param>${useTag}</param></tags>
</configuration>
Run 1 testsuite, run testCases tagged with "Test" on enviroment "Test" :smileyhappy:
mvn clean test -Denv="Test" -DtestSuite="NAME_testSuite" -DuseTag="TestCase Test"
Start all testSuites, run testCases tagged with "Test" on enviroment "Test" :smileyhappy:
mvn clean test -Denv="Test" -DuseTag="TestCase Test"
Start all testSuites, run all active testCases on enviroment "Integration" :womanfrustrated:
mvn clean test -Denv="Integration"
Response:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.203 s
[INFO] Finished at: 2019-05-06T14:27:33+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.smartbear:ready-api-maven-plugin:2.6.0:test (default) on project flexibill-soapui-tests: Execution default of goal com.smartbear:ready-api-maven-plugin:2.6.0:test failed.: NullPointerException -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
Thank you
Cekay