In the api test through postman, the api works normally, but in the test through mockmvc, a 404 error appears. My Controller class My SecurityConf ...
In the api test through postman, the api works normally, but in the test through mockmvc, a 404 error appears. My Controller class My SecurityConf ...
I'm new to MockMVC. I've successfully written some basic tests, but I got stuck on trying to test an use case with the endpoint that requires a POST r ...
I'm using Spring WebMvc 5.3 (along with the spring-test module of the same version). The mockito version I'm using is 3.6. I have a controller method ...
JsonPath itself can be configured like this The example above enables Option.REQUIRE_PROPERTIES configuration option, so it will throw an exception ...
I got this unit test code to test my spring mvc view, its look like failing to initialize the service. And getting following error Caused by: java ...
I want to call write below code to write integration test for login in Kotlin: But I get an HTTP status 400 with error message saying: "The specif ...
I am using MockMVC and Spring REST docs and am trying to generate a curl snippet that has the certificate in it. I imagine the certificate portion of ...
I am writing some integration tests in which I need to send in an api call to create a resource and then perform subsequent api calls based on that re ...
I am trying to write MockMVC test for a searchController where I want to mock entry point of solr data to the api. So that my api do the rest of the s ...
I'm working on writing test case using MockMvc and Mokito. Assume I have a list of order: The column order_id is unique since I set it as primary ...
I have the following code: @DeleteMapping(value = ["/library/books/{id}"]) fun deleteBook( @PathVariable("id") id: kotlin.Int): ResponseEntity<Uni ...
I have simple code: I use Here is my DTOs: public class CreditDto { public final String title; public final String description; ...
By example, have a simple login and logout application in Java Spring Boot 3, and i need create the test class, in my project has tree .java files, Au ...
I'm trying to test a file upload using MockMvc, here is the code snippet: The call goes through. The method processing the request has only one par ...
I have an integration test class like this (but more complex) and all tests in this class pass as if after each test obj is reset to its initial va ...
Basically, I am trying to test a POST endpoint of my Spring-Boot API, using the MockMvc standalone setup and Mockito. The endpoint is publishing an ev ...
In my project I have a unique constraint on a name value which I annotated like so: this is fine, and works...what I want to do in the project depl ...
I am trying to test a post method called saveProduct in my springboot application. It takes params like product, bindingResult, model, multipartFile, ...
I'm trying to test my REST Controller in my Spring Boot application. This is my test class When I put @Autowired on the MockMvc field Intellij give ...
I created a test code for @RestController on the spring boot and this error occurs. I see this problem even though I added @Service annotations to ...