Suppose you want to run the tests in the package de.coreservices.strategies.impl. Then your tests must have one of the annotations @UnitTest, @IntegrationTest, @DemoTest, @PerformanceTest or @ManualTest and you can type:
ant clean all alltests -Dtestclasses.packages=de.coreservices.strategies.impl.*
This will run tests in the folder testsrc of your extension. If you want to run the tests of the folder web/testsrc, you must use:
ant clean all allwebtests -Dtestclasses.packages=de.coreservices.web.converters.impl.*
This way of starting the tests ist deprecated and in Hybris 5.3 the ant target was removed. Please read:
Testing in the hybris Multichannel Suite
Today Eclipse crashes every time a try to run a unit test and Intellij compiles the whole Hybris project but doesn't start the Unit test runner.
So I decided to run my test using ant:
ant clean all yunit -Dtest=de.sample.coreservices.services.impl.PriceRowBasedEnergyPriceServiceTest
With the parameter test you can choose a test to run. Unfortunately you cannot run two or more tests.
Based on Hybris 4.8.14, 5.7