I know that when using webEnvironment=RANDOM_PORT
in a spring test, spring will run a web server and the test will cover scenarios starting from real http request while webEnvironment=MOCK
will only mock a web server's behavior.
I've already looked at Difference between webEnvironment = RANDOM_PORT and webEnvironment = MOCK.
As it is not answered in the similar question, it is still unclear which failure scenarios will be caught when RANDOM_PORT
is used that MOCK
is incapable of catching it.
Thanks is advance.