Spring has taken over as the leading platform to create web-based, APIs and microservices in the Java world. As a modern framework, it comes with many features for testing. In this tutorial, we're going to cover and experiment with the Spring testing capabilities and learn about how to use them for quick feedback, different levels of testing, and long-term test maintenance.
What attendees will be able to do after they complete the tutorial:
- Describe Spring testability features
- Decide when to use which tests: unit, integration and UI
- Test APIs with database supported integration tests
- Simulate dependent APIs responses
- Optimize code for testability
Topics covered in the tutorial:
- Quick review to Spring and Spring Boot and their use in modern software projects (web, microservices, API)
- Spring architecture support for testing (beans, configurations and profiles)
- Project organization of code, tests and configuration
- Spring's support for different types of tests (unit, integration, API)
- Spring's support for database-based tests, including in-memory databases
- Test categorization principles - What kind of tests to write for parts of the API
- Mocking dependent services and APIs
- Test isolation and clean-up