cancel
Showing results for 
Search instead for 
Did you mean: 

How to run more than 1 test suite via maven...

Contributor

How to run more than 1 test suite via maven...

clean test -Dsoapui.test-suite=My Test Suite

I run my project by above command and test suite is set in configuration block in pom.xml

<testSuite>My Test Suite</testSuite>

By passing comma separated values to test suite it runs only last test suite mentioned in that string.

 

9 REPLIES 9
Community Hero

Re: How to run more than 1 test suite via maven...

No voice in maven.

Just curious what happens if you do not provide system argument "-Dsoapui.test-suite=My Test Suite"? And remove it from in pom.xml as well. I believe that entire project would be run. Is that what you need?

If the above do not help, Can you run maven build twice with different system argument and see if that helps.


Regards,
Rao.
Contributor

Re: How to run more than 1 test suite via maven...

Yeah of course removing testSuite property and running multiple builds will run my multiple test suites.

 

My project has 10 test suites and user can run more than 1 test suite at a time, not necessarily he/she wants to run all 10 test suites. Leaving testSuite property empty will run full project.

Community Hero

Re: How to run more than 1 test suite via maven...

Ok. Are your tests independent? then see if the below link, of maven running parallel, helps.
https://cwiki.apache.org/confluence/display/MAVEN/Parallel+builds+in+Maven+3



Regards,
Rao.
Contributor

Re: How to run more than 1 test suite via maven...

Yes my test are independent and my company 100s of APIs projects, each project is 1 build in POM on which i run test goal of maven to run my project. In same build block i wanted to have flexibility if full project should run or selected test suites.

 

Thanks for your prompt replies though.

Contributor

Re: How to run more than 1 test suite via maven...

@nmrao Any suggestion here to run selective test case or test suite vs running full project ?

Contributor

Re: How to run more than 1 test suite via maven...

did you figureout how to run multiple testsuites( specifc testsuites) i have 13 test suites in 1 project. but i want to to run specifically 3 through using maven

Contributor

Re: How to run more than 1 test suite via maven...

did you figureout how to run multiple testsuites( specifc testsuites) i have 13 test suites in 1 project. but i want to to run specifically 3 through using maven


@ripplegupta wrote:

@nmrao Any suggestion here to run selective test case or test suite vs running full project ?


 

Contributor

Re: How to run more than 1 test suite via maven...

@harry Had to apply hack.

I am assuming you are passing names of test suites/cases to run to testRunner or maven command.

In Before Project Run Event Handler, capture test suite/case names. Iterate full project and disable every test suite/case dynamically which does not match your input.

 

Let me know if you got the idea.

Contributor

Re: How to run more than 1 test suite via maven...

I had logic disable the testsuites based on a property in the ( project. properties file). But through maven command i want to run particular test suites . Please, find the  attached pom.xml

New Here?
Join us and watch the welcome video:
Top Kudoed Authors