Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Do you really send HTTP requests for testing Controllers when used MockMVC?

 
Ranch Hand
Posts: 238
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, it's really confusing to understand whether a real HTTP request is sent to the controller or test-controller in case of using spring's MockMVC instance while testing the Controller classes in a java based web application. Please share your experience.
Thanks.
 
Saloon Keeper
Posts: 10495
224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. MockMvc doesn't start the web server. It mocks incoming requests and routes them to the appropriate controllers.
 
You ridiculous clown, did you think you could get away with it? This is my favorite tiny ad!
professionally read, modify and write PDF files from Java
https://products.aspose.com/pdf/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!