Tagged articles
Unit Test
11 articles · Page 1 of 1
This guide walks through setting up Spring Boot 3.x with JDK 17+, adding Actuator and test dependencies, and implementing a comprehensive JUnit 5 test suite that validates health endpoint aggregation, status priority, show‑details configuration, custom endpoints, JVM metrics, endpoint exposure, health groups, and custom HTTP status mapping, with instructions for running the tests via Maven or an IDE.
ActuatorJDK 17JUnit5
0 likes · 17 min read

This article provides a comprehensive set of JUnit 5 unit tests that demonstrate how Spring Boot 3.x and Spring Framework 6.x handle various circular dependency scenarios—including field, setter, constructor, @Lazy, prototype beans, three‑bean cycles, and AOP proxy interactions—along with Maven and IDE run instructions.
AOPCircular DependencyJava
0 likes · 12 min read

This article provides a detailed tutorial on Go's testing framework, covering test classifications such as unit, benchmark, example, and fuzz tests, explaining naming conventions, file organization, test execution commands, parallel testing, coverage measurement, and how to integrate these practices into robust backend development workflows.
Unit Testbenchmarkexample-test
0 likes · 31 min read

This guide shows how to add a retry mechanism to Spring Boot applications using Spring Retry, covering dependency setup, enabling @EnableRetry, defining @Retryable with custom back‑off settings, handling failures with @Recover, writing unit tests, and observing behavior with different retry counts and exception filters.
@EnableRetry@RetryableJava
0 likes · 6 min read

This article introduces Go's native testing ecosystem—including unit testing, benchmark performance measurement, code‑coverage analysis, fuzz testing, and race‑condition detection—through a practical bookkeeping‑app example, demonstrating how each tool can uncover bugs, improve performance, and raise overall code quality.
Race DetectionUnit Testcode coverage
0 likes · 11 min read

This article demonstrates how to implement the Chain of Responsibility design pattern in PHP using the Hyperf framework, detailing the file structure, core classes such as IndexController, HandlerInterface, AbstractHandler, and concrete handlers, and includes a unit test example to verify the workflow.
Chain of ResponsibilityDesign PatternHyperf
0 likes · 7 min read

This article provides a step‑by‑step guide on mocking static variables and static methods in the Spock testing framework using PowerMock, covering annotation setup, custom behavior definitions, and handling mixed scenarios where both static and instance mocks are required.
Java TestingMockitoPowerMock
0 likes · 5 min read

This article explains the importance of unit testing for reliable software, introduces Go's built‑in testing framework, demonstrates how to write test files, use TestMain, benchmark code, and employ the httptest package for HTTP server testing, all illustrated with complete code examples.
Unit Testbenchmarkcode coverage
0 likes · 12 min read

Learn step‑by‑step how to set up multiple MySQL data sources in Spring Boot 2.2.2, configure corresponding JdbcTemplate beans, define entity and service layers, and run unit tests, with full Maven dependencies, property settings, Java configuration, and SQL DDL examples.
JavaJdbcTemplateMultiple DataSource
0 likes · 9 min read

This tutorial walks through writing and running unit and integration tests for a Spring Boot application, covering JUnit and Hamcrest assertions, Maven setup, model definitions, service and controller implementations, MockMvc usage, and both mocked and real‑world test scenarios, complete with sample code and output.
HamcrestIntegration TestJUnit
0 likes · 25 min read

This tutorial shows how to replace the default Spring Boot @Async executor with a custom ThreadPoolTaskExecutor, explains each pool parameter, demonstrates annotating async methods to use the pool, and provides a unit test that verifies the thread naming and execution behavior.
AsyncConcurrencyJava
0 likes · 6 min read
