I need to execute maven tests from another program, in this case HP QC/ALM. I want to execute specific tests, and so I have written a .bat-file that looks like this:
cd C:\myPath\
call mvn -Dtest=myPackage.MyTestClass test
call mvn -Dtest=myPackage.MyOtherTest test
First of all I am calling the path where the pom.xml file is located. This is needed even if the .bat-file is in the same directory.
second I am calling a specific extension of a TestCase
-class, with multiple test methods. I am using JUnit 3.
third I am calling another specific TestCase
-class.
The first TestCase is executed as expected. My problem is that the execution stops after the first TestCase. The call
keyword is supposed to force the execution to continue, but it has no effect here. Wether the tests are succesful or not makes no difference.
I can't seem to find any other suggestions than the call keyword to solve this problem. Am I using it wrong? Does anyone have any idea why it does not work? Are there other solutions or suggestions I could try?
UPDATED WITH ADDITIONAL INFO:
Command line execution stops after the following output:
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 82.964 sec
Results :
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0
This is the 11 tests included in myPackage.MyTestClass
the way i use for run specific suite of test cases is:
That's all i know until now. If you found a better for way do this, please let know ;)