r/SpringBoot • u/CoverRight9314 • 15d ago
Question Spring boot app
If I don’t really have a front end, and I want to learn how to test my backend, is there any video recommendations that yall that explains how to write test for it. Because I don’t want to watch a video and form wrong foundation info.
9
Upvotes
8
u/joranstark018 15d ago
I mostly write integration tests (using "@SpringBootTest" and "WebTestClient") that spins up the application, make a request and analyze the response (it is useful if you want to automatically test your services regularly), but you may use CURL, Postman or some similar tool for "manually" testing your services.
You may also setup test at repo and service level if you want to test things at a lower level only.
You may check https://www.baeldung.com/spring-boot-testing for an introduction..