-
Intellij + Infinitest Continuous Testing
The Infinitest is a continuous testing plugin, it helps to run the test automatically.
Date: 2019-08-17 View: 1520
-
JUnit Categories Test
In JUnit, you can organize the test cases into different categories, and run those categorized test cases with @Categories.ExcludeCategory or @Categories.IncludeCategory
Date: 2019-08-17 View: 1520
-
Unit Test What is Mocking? and Why?
In simple, mocking is creating objects that mimic the behavior of real objects. Refer to the following case study :
Date: 2019-08-17 View: 1520
-
Spring Boot Test How to disable DEBUG and INFO logs
Run the Spring Boot integration test or unit test, many annoying DEBUG and INFO logs are displayed in the console.
Date: 2019-08-11 View: 1520
-
Spring WebFlux Test Timeout on blocking read for 5000 MILLISECONDS
Test a Spring Webflux endpoint with the WebTestClient, and hits the following error messages. Is this possible to increase the timeout?
Date: 2019-08-11 View: 1520
-
Spring Boot + JUnit 5 + Mockito
In this article, we will show you how to do Spring Boot 2 integration test with JUnit 5, and also Mockito.
Date: 2019-08-11 View: 1520
-
Spring Boot Test unable to autowired MockMvc
Spring Boot integeration test, but unable to @Autowired MockMvc
Date: 2019-08-11 View: 1520
-
Spring REST + Spring Security Example
In this article, we will enhance the previous Spring REST Validation Example, by adding Spring Security to perform authentication and authorization for the requested URLs (REST API endpoints)
Date: 2019-08-11 View: 1520
-
JSONAssert How to unit test JSON data
In Java, we can use JSONAssert to unit test JSON data easily.
Date: 2019-08-11 View: 1520
-
Mockito How to mock repository findById thenReturn() Optional?
Try to mock a repository findById method, but no idea use thenReturn() to return an object, as it accepts an Optional?
Date: 2019-08-11 View: 1520
-
Spring Boot How to init a Bean for testing?
In Spring Boot, we can create a @TestConfiguration class to initialize some beans for testing class only.
Date: 2019-08-11 View: 1520
-
Spring + Mockito Unable to mock save method?
Try to mock a repository save() method, but it is always returning null?
Date: 2019-08-11 View: 1520
-
Spring Test How to test a JSON Array in jsonPath
In Spring, we can use Hamcrest APIs like hasItem and hasSize to test a JSON Array. Review the following example :
Date: 2019-08-11 View: 1520
-
Spring REST Integration Test Example
In this article, we will show you how to test the Spring Boot REST application. Normally, we use the MockMvc or TestRestTemplate for the integration test.
Date: 2019-08-11 View: 1520