Testing a Java web service is most valuable when it checks the application boundaryânot just a controller method in isolation.
Solonâs test support gives that boundary a compact shape. With solon-test, a JUnit 5 test can boot a Solon application, receive injected components, and exercise local HTTP endpoints through HttpTester. The result is a test that stays in the same codebase as the service and can grow from a quick debugging aid into a repeatable regression suite.
This article uses Solon v4.0.3 and focuses on the small set of test primitives worth standardizing first: @SolonTest, HttpTester, @Import, and @Rollback.
Start with the standard test dependency
For JUnit 5 projects, add solon-test with test scope. When the application already uses solon-parent v4.0.3, dependency versions are managed by the parent.






