Check that the option Project > Build Automatically is turned off.
Write your unit test
In a command line window run ant clean all yunit yunitweb. We compile the code of all the tests.
Refresh all the projects in Eclipse
Open the class with the unit test in Eclipse.
Select Run As > Junit Test
If it doesn't find the classes with the tests, you would have to correct the classpath of the running configuration:
Go to Run Configurations… in Eclipse
Select the configuration of the unit test and go to the tab Classpath
Click on the button Add projects… and add all the projects which you have on your workspace. You could also add platform and all the extensions which depend on your current one.
Click on Apply
Run the unit test.
If it still doesn't work:
Here is the official Hybris documentation of Hybris 4.x
This hybris version shouldn't be used by anyone. Calculate the number of views of this page in two months and remove it if there isn't enough traffic
–Tested on SAP Hybris 4.8.12