From the course: Spring Cloud GCP: Setting Up a Cloud SQL Database
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Unit testing
From the course: Spring Cloud GCP: Setting Up a Cloud SQL Database
Unit testing
- [Woman] Unit testing is where we test a specific unit of code in isolation after marking any dependencies. In this video, we will add a Spring Boot test for unit testing our puzzle app and mark our database connection. Before we write any tests, I want to highlight two changes in my palm.XML file. The first change between lines 27 and 29 is the addition of spring starter test project. This spring starter dependency provides support for J unit five, the latest version of the unit testing framework for Java. Between lines 52 and 56, I added another plug-in in our built section of our palm.XML file. This will be used in our test phase of our app to run unit tests and generate reports in our target directory. Now let's take a look at the class we would like to start testing the puzzle controller. This controller has create, update, read and delete methods actually leveraging the puzzle repository to some extent, I want to…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.