Currently we are using JUnit4 testing framework in our project with SAP Commerce 1808, and the unit tests are working fine.
However, we would like to start using JUnit5 framework. After importing respective JUnit5 libraries and compiling the unit test, I have run the command in the console:
ant unittests -Dtestclasses.packages=<package_name> -Dtestclasses.suppress.junit.tenant=true
ant was not able to find the test class and showed the output in the console:
...
[echo] No tests found!
Which is surprising, because I have used the annotation @UnitTest before the class name:
@UnitTest
public class ClassName{
...
}
Trying to find an answer, I searched for examples of unit tests in SAP Commerce documentation: https://help.sap.com/viewer/d0224eca81e249cb821f2cdf45a82ace/1808/en-US/aae25ecb74ab4bd69cc5270ffd455459.html and noticed that all the unit test examples use only JUnit4 framework.
Also I checked Hybris out-of-the-box code and also saw that only JUnit4 framework is used there.
So the question is: how to run JUnit5 tests in SAP Commerce 1808?