Skip to content
The Practical Developer
The Practical Developer

Software Development is easy when you understand what you're doing

Primary Navigation Menu
Menu
  • Blog
  • Topics
    • Agile
    • Architecture
    • DevOps
    • Docker
    • Kafka
    • Microservices
    • RabbitMQ
    • Reactive
    • Spring Boot
    • Testing
  • Projects
    • The Practical Architecture Process
    • Basic Java Maven Archetypes
  • About
  • Home

junit

Spring Boot Test

Guide to Testing Controllers in Spring Boot

Unit and Integration Tests for RestControllers in Spring Boot There are different ways to test your Controller (Web or API Layer) classes in Spring Boot, some provide support to write pure Unit Tests and some others are more useful for Integration Tests. Within this post, I’ll cover the main three test approaches available for Spring: using MockMVC in standalone mode, MockMVC together with SpringRunner, and using SpringBootTest.Read More →

2017-07-31
By: Moisés
On: July 31, 2017
In: Highlighted, Spring Boot, Testing
With: 30 Comments

Integration testing with Mockito and Spring Boot

Introduction Within this post, I show you how to setup a Unit Test in Spring Boot performing HTTP requests with Mockito. In this case, we’re using Model in our controller, but we could follow similar instructions for a REST controller case. Sometimes testing web access with Spring Boot can be tricky. There are some different annotations for different scenarios, and the configuration is also one of the most struggling parts.Read More →

2015-11-10
By: Moisés
On: November 10, 2015
In: how-to's, Spring Boot, Testing
With: 0 Comments

Social

Subscribe to TPD

Click here to subscribe

Search

Follow me on Twitter

My Tweets

Effective Meetings

Check out Agile Meeting Cards, a new game to improve your meeting quality, based on a quick and honest feedback. And it’s a Card Game!

Agile Meeting Cards

Recent Posts

  • Custom Error Handling in REST Controllers with Spring Boot
  • Java 12’s Switch Expressions in 5 minutes
  • Spring Boot and Kafka – Practical Configuration Examples
  • How to deploy a Spring Boot WAR to Wildfly, JBoss or Tomcat
  • Java and JSON – Jackson Serialization with ObjectMapper

Tag Cloud

agile amqp angular architecture benchmark book cucumber docker docker-compose elasticsearch eureka full-reactive-guide gamification hystrix integration integration tests jacoco java java9 jboss JSON junit logstash microservices mockito plan rabbitmq reactive REST ribbon scrum serialization service-discovery sonar sonarqube spring spring-boot Swagger test coverage testing user story war webflux wildfly zuul

Categories

More

Follow me on Twitter
Quboo - Gamification to improve your Code Quality
Get a Quboo account for free and start using Gamification to improve your Legacy Code, release more often and write docs.
More Info
Profile Picture
My name is Moisés Macero, Software Developer, Architect, and Writer. I like sharing knowledge and coaching. How can I help you?
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

©2019 thepracticaldeveloper.com | Privacy Policy