January 2018
Intermediate to advanced
414 pages
10h 29m
English
Our microservice is ready but we have no test to validate it. We should have it verified so that our software works before deploying it into production, so let's do some tests.
Now, we will create a SpringBootTest in our project, in IntelliJ IDEA. In the Project window, right-click on our package com.microservices.chapter11 in the src/test/kotlin folder and then choose New | Kotlin File/Class. In the pop-up window, we will set the name as CustomerControllerTest and in the Kind drop-down, choose Class:
package com.microservices.chapter11import org.junit.Testimport org.junit.runner.RunWithimport org.springframework.beans.factory.annotation.Autowiredimport org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc ...
Read now
Unlock full access