-
Spring Batch unit test example
In this tutorial, we will show you how to unit test Spring batch jobs with jUnit and TestNG frameworks. To unit test batch job, declares spring-batch-test.jar, @autowired the JobLauncherTestUtils, launch the job or step, and assert the execution status.
2019-08-18【[Java]】
阅读更多 -
NoSuchBeanDefinitionException : No qualifying bean of type JobLauncherTestUtils
Following the official Spring batch unit testing guide to create a standard unit test case.
2019-08-18【[Java]】
阅读更多 -
Ant and TestNG Task example
In this tutorial, we will show you how to run a TestNG test in Ant build.
2019-08-18【[Java]】
阅读更多 -
Gradle How to skip unit test
Be default, Gradle build is abort if any unit tests is failed. Oftentimes, we still need to build the project even the unit test is failed.
2019-08-18【[Java]】
阅读更多 -
Java Custom Annotations Example
In this tutorial, we will show you how to create two custom annotations – @Test and @TestInfo, to simulate a simple unit test framework.
2019-08-17【[Java]】
阅读更多 -
Must include junit.jar if not in Ants own classpath
Declares a junit task in Ant like this
2019-08-17【[Java]】
阅读更多 -
Ant and jUnit Task example
In this tutorial, we will show you how to run a junit test in Ant build.
2019-08-17【[Java]】
阅读更多 -
Logback Disable logging in Unit Test
While the unit test is running in the IDE, the Logback is showing a lot of configuration or status like this :
2019-08-17【[Java]】
阅读更多 -
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 :
2019-08-17【[Java]】
阅读更多 -
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.
2019-08-11【[Java]】
阅读更多 -
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?
2019-08-11【[Java]】
阅读更多 -
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.
2019-08-11【[Java]】
阅读更多 -
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)
2019-08-11【[Java]】
阅读更多 -
JSONAssert How to unit test JSON data
In Java, we can use JSONAssert to unit test JSON data easily.
2019-08-11【[Java]】
阅读更多 -
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.
2019-08-11【[Java]】
阅读更多