Testing is crucial to cloud native application development. It is our primary (and sometimes only) way to build confidence that we can push to production at any given time.
In many traditional organizations with independent, quality assurance and testing teams, software engineers may only leverage unit tests. As a balanced team with complete ownership of releases, we write and own an extensive spectrum of tests for our app. These include:
While we may use some additional layers such as end-to-end tests or automated UI tests, these are the most expensive to run. We look to build confidence with the other leaner test layers when possible.
Read this article to learn more on testing various slices of your Spring Boot application.
Read through the Quick Start Guide on Consumer-Driven Contract testing with Spring Cloud Contract.
Now that you know the tools you have to test your application, it’s time to learn how to use those tools in your development project.
VMware Tanzu develops software using the test-driven development methodology of writing tests to describe our intended behavior. First, we write tests, see our tests fail, build the functionality to make our tests pass, and clean up any technical debt created during the process. This approach is often referred to as the “red-green-refactor” loop. The best way to learn about test-driven development is to do some of it! Pairing with an experienced software engineer will give you lots of practice. Or, if you prefer to do it yourself, you can prepare by reading this article on TDD exercises and running through some of the first requirements for the Greeting exercise in your IDE.