Skip to Content
Mastering Spring Cloud
book

Mastering Spring Cloud

by Piotr Mińkowski
April 2018
Intermediate to advanced content levelIntermediate to advanced
432 pages
10h 38m
English
Packt Publishing
Content preview from Mastering Spring Cloud

Testing Spring Boot applications

As you might have read in the previous section, there are some different strategies and approaches to the tests in your application. I have briefly mentioned all of them, so now we may proceed to the practical aspects. Spring Boot provides a set of utilities that help in the implementation of automated tests. In order to enable these features in the project, you have to include the spring-boot-starter-test starter to the dependencies. It imports not only the spring-test and spring-boot-test artifacts, but also some other useful test libraries, such as JUnit, Mockito, and AssertJ:

<dependency>    <groupId>org.springframework.boot</groupId>    <artifactId>spring-boot-starter-test</artifactId>    <scope>test</scope>
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microservices with Spring Boot and Spring Cloud - Second Edition

Microservices with Spring Boot and Spring Cloud - Second Edition

Magnus Larsson

Publisher Resources

ISBN: 9781788475433Supplemental Content