Unit Testing of Spring MVC Controllers: Normal Controllers

preview_player
Показать описание
This video describes how we can write unit tests for controller methods which renders a view or processes form submissions.

If you want to learn how to write unit tests for Spring web applications, take look at my Test With Spring course:

Part 1:

Get the example application:

Original blog post:
Рекомендации по теме
Комментарии
Автор

hi, i am unable to mock mockMVC object, can you please help

CodeWithAbhiee
Автор

Here is the video version (Part 2) of my Unit Testing of Spring MVC Controllers series. This video describes how we can write unit tests for controllers which renders a view of processes form submissions. #springframework #springmvctest #unittesting  

PetriKainulainen
Автор

I am getting no modelandview found . please help

amir
Автор

Hi Petri Kainulainen
I lyk ur videos.i need help.how to inject/mock the Httpservletrequest/response in my test class.i am using @Mock private Httpservletrequest request;
Pls suggest..
I am getting injection of is failed.

ManpreetKaur-ljwe