To make JUnit work within Domino Designer you need to perform few additional steps:
- set up source control for your application
- adjust the on-disk project to be recognized as Java application
- run JUnit tests within your on-disk project
Please note that java agents have to be tested in a different way..
You can find more detailed explanation about enabling JUnit for both XPages and Agents in the following blog post: Unit Tests for Lotus Domino Applications
Here's also a great how-to on this topic.