Tagged articles
55 articles
Page 1 of 1
Woodpecker Software Testing
Woodpecker Software Testing
Dec 28, 2025 · Backend Development

Deep Dive into JUnit: Core Concepts, Components, and Design Pattern Integration

This comprehensive tutorial explains JUnit's definition, core components, annotations, assertion methods, test suite creation, custom test rules, and how common design patterns such as Factory, Decorator, Strategy, and Template Method can be applied to write flexible, maintainable Java unit tests, plus installation steps and advanced usage tips.

Design PatternsJUnitTest Annotations
0 likes · 25 min read
Deep Dive into JUnit: Core Concepts, Components, and Design Pattern Integration
Woodpecker Software Testing
Woodpecker Software Testing
Dec 25, 2025 · Backend Development

Using ChatGPT to Refine Java Unit Tests – Episode 23

This article walks through adjusting Java unit tests with ChatGPT, measuring coverage using JaCoCo, rewriting test code for User and PasswordRecovery classes, adding Mockito and PowerMock mocks, and showing how the changes raise coverage from 73.7% to over 80% across the project.

ChatGPTJUnitJaCoCo
0 likes · 17 min read
Using ChatGPT to Refine Java Unit Tests – Episode 23
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Sep 21, 2025 · Backend Development

Mastering Spring Boot Controller Tests: 8 Powerful Techniques

This article presents a comprehensive guide to testing Spring Boot controller layers, covering isolated @WebMvcTest, full‑stack @SpringBootTest, WebTestClient, TestRestTemplate, standalone MockMvc, REST Assured, exception‑handling advice, and pure Mockito unit tests, each with purpose, core annotations, sample code, pros, cons, and usage recommendations.

Controller TestingIntegration TestJUnit
0 likes · 20 min read
Mastering Spring Boot Controller Tests: 8 Powerful Techniques
FunTester
FunTester
Jul 21, 2025 · Information Security

Unlock Hidden Bugs: How Fuzz Testing Strengthens Java Security and Stability

Fuzz testing injects massive amounts of random or semi‑random inputs into applications to expose crashes, logic errors, and security flaws, and the article explains its principles, the types of defects it uncovers, real‑world practices at Google Chrome, and step‑by‑step Java integration using CI Fuzz and JUnit.

CI FuzzDynamic analysisJUnit
0 likes · 7 min read
Unlock Hidden Bugs: How Fuzz Testing Strengthens Java Security and Stability
macrozheng
macrozheng
May 23, 2025 · Fundamentals

Why ‘+’ Can Outperform StringBuilder in Java: Real Benchmarks Explained

This article investigates the performance differences between Java’s ‘+’ operator, StringBuilder, and StringJoiner for string concatenation, presenting JUnit benchmark results for single and looped concatenations, analyzing compiled bytecode, and concluding when each method is optimal for readability and speed.

JUnitString concatenationstringbuilder
0 likes · 7 min read
Why ‘+’ Can Outperform StringBuilder in Java: Real Benchmarks Explained
Java Captain
Java Captain
May 9, 2025 · Databases

Using H2 Database in Embedded, Server, and Mixed Modes with Java

This article demonstrates how to use the H2 database with Java 1.8, covering embedded (file and memory) modes, server modes (Web, TCP, PG), mixed mode configurations, required dependencies, and provides complete JUnit test code examples for creating, accessing, and managing tables.

JDBCJUnitServer
0 likes · 17 min read
Using H2 Database in Embedded, Server, and Mixed Modes with Java
JD Tech
JD Tech
Nov 28, 2024 · Fundamentals

Comprehensive Guide to Unit Testing Strategies and Tools for Java Projects

This article presents a detailed, step‑by‑step guide on improving unit test coverage in large Java codebases, covering strategies such as mocking, divide‑and‑conquer, tool‑assisted test generation, reflection‑based coverage, Maven configuration, and practical tips for handling static methods, final classes, and test data replay.

JUnitMockitocode coverage
0 likes · 27 min read
Comprehensive Guide to Unit Testing Strategies and Tools for Java Projects
Java Tech Enthusiast
Java Tech Enthusiast
Aug 22, 2024 · Fundamentals

Using PowerMock for Unit Testing in Java: Basics and Advanced Techniques

The article demonstrates how PowerMock can be used to unit‑test a Java FileParser class—showing basic mocks for files and streams, advanced techniques for final and static classes, and achieving full coverage—while warning that its heavy class‑loader overhead can dramatically slow large test suites and increase memory consumption.

JUnitMockingPowerMock
0 likes · 10 min read
Using PowerMock for Unit Testing in Java: Basics and Advanced Techniques
Software Development Quality
Software Development Quality
Aug 9, 2024 · Fundamentals

Mastering Idempotency Testing: Scenarios, Detection, and Real-World Test Cases

This article explains idempotency testing, outlines common scenarios such as network requests and financial transactions, describes methods to detect duplicate requests, provides comprehensive coverage strategies, offers practical test‑case examples, lists relevant testing tools, and includes a JUnit code sample for implementation.

IdempotencyJUnitSoftware Testing
0 likes · 11 min read
Mastering Idempotency Testing: Scenarios, Detection, and Real-World Test Cases
Java Architect Essentials
Java Architect Essentials
Jun 16, 2024 · Backend Development

Performance Comparison of String Concatenation Using '+' Operator vs StringBuilder in Java

This article examines the performance differences between using the '+' operator and StringBuilder for string concatenation in Java, presenting JUnit benchmark tests for simple concatenations and looped concatenations, analyzing compiled bytecode, and concluding that '+' is suitable for simple cases while StringBuilder excels in loops.

JUnitString concatenationjava
0 likes · 7 min read
Performance Comparison of String Concatenation Using '+' Operator vs StringBuilder in Java
JD Tech Talk
JD Tech Talk
Jun 7, 2024 · Artificial Intelligence

AI‑Powered JUnit Rule for Automatic Error Reporting to GPT

This tutorial shows Java engineers how to build a JUnit Rule that captures test failures, extracts the exception stack and source file, and automatically sends the information to OpenAI's GPT for analysis and code‑fix suggestions, complete with reusable data‑model classes and utility methods.

GPTJUnitLLM
0 likes · 13 min read
AI‑Powered JUnit Rule for Automatic Error Reporting to GPT
JD Retail Technology
JD Retail Technology
May 13, 2024 · Backend Development

A Minimalist Guide to Setting Up Unit Tests in Spring Boot

This article presents a concise, beginner-friendly approach to building a Spring Boot unit testing environment using only essential Maven dependencies and test classes, covering both integration-style and pure unit test techniques, complete with annotated examples and practical testing tips.

Integration TestJUnitMocking
0 likes · 9 min read
A Minimalist Guide to Setting Up Unit Tests in Spring Boot
Top Architect
Top Architect
Feb 4, 2024 · Backend Development

Performance Comparison of String Concatenation Using '+' Operator vs StringBuilder in Java

This article examines Java string concatenation methods, presenting JUnit benchmarks that compare the '+' operator and StringBuilder in both single and loop scenarios, revealing that while simple concatenations perform similarly, loop concatenations are dramatically faster with StringBuilder, leading to practical recommendations.

BackendJUnitstring-concatenation
0 likes · 8 min read
Performance Comparison of String Concatenation Using '+' Operator vs StringBuilder in Java
DaTaobao Tech
DaTaobao Tech
Sep 14, 2022 · Backend Development

Optimizing Maven Surefire Parallel Execution for Large-Scale Unit Tests

The Taobao User Operations Platform team reduced CI unit‑test time from fifty minutes to ten by configuring Maven Surefire to reuse forks, use a fork count of twice the CPU cores, and run methods in parallel with an appropriate thread count, achieving faster builds while keeping failure rates low.

CIJUnitParallelTesting
0 likes · 10 min read
Optimizing Maven Surefire Parallel Execution for Large-Scale Unit Tests
FunTester
FunTester
Aug 30, 2022 · Fundamentals

JUnit Annotations for Selenium Testing: Overview and Usage

This article explains why JUnit is a popular Java testing framework, lists its key features, and provides a comprehensive guide to using JUnit annotations—including @BeforeClass, @Before, @Test, @After, @AfterClass, @Ignore, and advanced annotations—in Selenium WebDriver automation scripts, complete with code examples and execution order details.

JUnitSeleniumannotations
0 likes · 11 min read
JUnit Annotations for Selenium Testing: Overview and Usage
FunTester
FunTester
Jun 21, 2022 · Fundamentals

Comparing TestNG and JUnit: Features, Annotations, and Usage in Java Unit Testing

This article explains unit testing concepts, outlines the differences between TestNG and JUnit—including test suite configuration, annotations, grouping, parameterization, dependency handling, exception and timeout testing—and provides code examples to help developers choose the most suitable Java testing framework.

JUnitTestNGannotations
0 likes · 11 min read
Comparing TestNG and JUnit: Features, Annotations, and Usage in Java Unit Testing
High Availability Architecture
High Availability Architecture
Jun 15, 2022 · Backend Development

Exploring JUnit Runners: Suite, Theories, Categories, Enclosed, Parameterized and More

This article provides a comprehensive guide to JUnit runners, detailing the purpose and usage of Suite, Theories, Categories, Enclosed, Parameterized, IgnoredClassRunner and other executors, accompanied by code examples and execution results to help developers apply flexible unit testing strategies in Java projects.

JUnitRunnerTesting framework
0 likes · 12 min read
Exploring JUnit Runners: Suite, Theories, Categories, Enclosed, Parameterized and More
JD Tech
JD Tech
May 25, 2022 · Backend Development

A Comprehensive Guide to JUnit Runners: Suite, RunWith, BlockJUnit4ClassRunner, Theories, Categories, Parameterized and More

This article explains the purpose and usage of various JUnit runners—including Suite, RunWith, BlockJUnit4ClassRunner, ParentRunner, Theories, Categories, Enclosed, Parameterized, and error‑handling runners—providing code examples and practical insights for flexible unit testing in Java projects.

JUnitparameterized testsrunners
0 likes · 12 min read
A Comprehensive Guide to JUnit Runners: Suite, RunWith, BlockJUnit4ClassRunner, Theories, Categories, Parameterized and More
Architect's Journey
Architect's Journey
Jan 26, 2022 · Backend Development

Unit Testing: How My Approach Differs from Yours

The article walks through a step‑by‑step evolution of a simple isEmpty utility, demonstrates proper JUnit assertions, introduces Mockito for isolating complex service logic, and explains Spring Boot Test components, illustrating why thorough unit testing saves time and improves code quality.

JUnitMockitoSpring Boot Test
0 likes · 13 min read
Unit Testing: How My Approach Differs from Yours
FunTester
FunTester
Aug 9, 2021 · Industry Insights

Which Java Testing Framework Reigns Supreme in 2021? A Deep Dive into the Top 9 Choices

This article surveys the popularity of Java, outlines the benefits of using Java testing frameworks, and provides detailed overviews of nine leading frameworks—including JUnit, JBehave, Serenity, Selenium, TestNG, Mockito, HTTPUnit, Gauge, and Geb—highlighting their core features and suitability for different testing needs.

JUnitSeleniumTestNG
0 likes · 18 min read
Which Java Testing Framework Reigns Supreme in 2021? A Deep Dive into the Top 9 Choices
Alibaba Cloud Developer
Alibaba Cloud Developer
May 11, 2021 · Backend Development

Mastering Java Unit Testing: A Deep Dive into Mockito & PowerMock

This comprehensive guide walks you through writing effective Java unit tests, covering test framework basics, Maven dependencies, typical code examples, step‑by‑step test case creation, mocking techniques with Mockito and PowerMock, verification strategies, handling special cases, and best practices for achieving high coverage.

JUnitMockingMockito
0 likes · 48 min read
Mastering Java Unit Testing: A Deep Dive into Mockito & PowerMock
Programmer DD
Programmer DD
Feb 25, 2021 · Backend Development

Master Spring Boot Unit Testing with MockMvc: A Complete Guide

This article explains the fundamentals of unit testing in Spring Boot, covering the purpose of unit tests, how to add the spring-boot-starter-test dependency, the role of MockMvc for controller testing, step‑by‑step creation of Service and Controller test classes, key annotations, assertion techniques, and a brief comparison with Postman.

JUnitMockMvcSpring Boot
0 likes · 13 min read
Master Spring Boot Unit Testing with MockMvc: A Complete Guide
Programmer DD
Programmer DD
Feb 20, 2021 · Backend Development

Mastering Java Unit Tests: Why Write Them and How to Do It Right

This article explains what unit testing is, why it’s essential, common obstacles, best practices for writing effective Java unit tests, including naming conventions, assertions, mocking strategies, and design principles for testable code.

JUnitMockitojava
0 likes · 10 min read
Mastering Java Unit Tests: Why Write Them and How to Do It Right
Top Architect
Top Architect
Jan 12, 2021 · Backend Development

Introduction to Mock Testing with Spring MVC and MockMvc

This article introduces mock testing for Spring MVC controllers, explains why mocks are useful, describes the main MockMvc components, shows required Maven dependencies, and provides complete example test cases for both view‑returning and JSON‑returning endpoints using JUnit and MockMvc.

BackendJUnitMockMvc
0 likes · 8 min read
Introduction to Mock Testing with Spring MVC and MockMvc
FunTester
FunTester
Dec 10, 2020 · Operations

Automate JUnit Tests in Jenkins: Step‑by‑Step Guide for CI/CD

This article explains how to integrate JUnit unit testing into Jenkins pipelines using Maven and Spring Boot, covering project setup, dependency configuration, test case creation, Jenkins job configuration, and result reporting to achieve fully automated testing in a DevOps workflow.

DevOpsJUnitJenkins
0 likes · 6 min read
Automate JUnit Tests in Jenkins: Step‑by‑Step Guide for CI/CD
vivo Internet Technology
vivo Internet Technology
Sep 10, 2020 · Mobile Development

Getting Started with Android Development Testing: Unit Tests and Espresso UI Tests

The guide walks developers through Android testing basics by explaining JUnit unit tests, instrumented tests, and Espresso UI tests, showing where local and device tests reside, demonstrating how to generate a Calculator unit test and an Espresso test for a simple activity, and how to run them in Android Studio.

AndroidEspressoInstrumentation
0 likes · 12 min read
Getting Started with Android Development Testing: Unit Tests and Espresso UI Tests
FunTester
FunTester
Aug 5, 2020 · Backend Development

Mocking Void Methods with Mockito: A Complete Step‑by‑Step Guide

This article explains how to use Mockito's doNothing, doAnswer, doThrow, and doCallRealMethod to mock void methods in Java, demonstrating parameter verification, argument capture, and real‑method invocation with detailed code examples and reasoning behind each approach.

JUnitMockingMockito
0 likes · 6 min read
Mocking Void Methods with Mockito: A Complete Step‑by‑Step Guide
转转QA
转转QA
Jun 24, 2020 · Fundamentals

EvoSuite Overview: Installation, Maven Configuration, and IDEA Plugin Usage

This article introduces EvoSuite, an open‑source tool for automatically generating JUnit test suites, explains how to configure it with Maven (including the required pom.xml entries), describes essential command‑line options, and provides step‑by‑step instructions for installing and using the EvoSuite plugin in IntelliJ IDEA, supplemented by practical examples and coverage analysis.

Automated TestingEvoSuiteIntelliJ IDEA
0 likes · 7 min read
EvoSuite Overview: Installation, Maven Configuration, and IDEA Plugin Usage
FunTester
FunTester
May 30, 2020 · Backend Development

Master PowerMock: Unit Test Private, Final, Static and Constructor Methods in Java

This guide explains why unit testing matters, compares Java testing tools, introduces PowerMock’s capabilities, details essential annotations, shows how to configure dependencies, and provides step‑by‑step code examples for mocking public, final, static, private, constructor, field and superclass methods.

JUnitMockingMockito
0 likes · 10 min read
Master PowerMock: Unit Test Private, Final, Static and Constructor Methods in Java
Java Captain
Java Captain
Jan 31, 2020 · Backend Development

Comprehensive Guide to Developing a Traditional Java Web Project

This article outlines the essential steps for creating a traditional Java web application, covering environment preparation, Maven skeleton creation, required dependencies for logging, databases, persistence, Spring integration, DAO and service layers, unit testing, and RESTful controller configuration.

JUnitMyBatisWeb Development
0 likes · 10 min read
Comprehensive Guide to Developing a Traditional Java Web Project
ITPUB
ITPUB
Jan 8, 2020 · Backend Development

How to Test Asynchronous Spring Operations with Byteman and BMUnit

This guide shows how to test asynchronous email‑sending logic in a Spring Boot application using Byteman, the BMUnit extension, JUnit 4, and a join‑er mechanism, all without modifying production code.

BytemanJUnitasync-testing
0 likes · 12 min read
How to Test Asynchronous Spring Operations with Byteman and BMUnit
FunTester
FunTester
Jan 7, 2020 · Fundamentals

Why High Test Coverage Can Mislead You: Lessons from Java Code

This article explains how test‑coverage metrics such as line and branch coverage can give a false sense of quality, demonstrates common pitfalls with Java examples and Cobertura reports, and offers practical guidelines for using coverage data to improve testing and code reliability.

CoberturaJUnitcode quality
0 likes · 17 min read
Why High Test Coverage Can Mislead You: Lessons from Java Code
FunTester
FunTester
Dec 11, 2019 · Fundamentals

How to Pick the Best Java Testing Framework for Selenium Automation

This article compares four popular Java testing frameworks—JUnit, JBehave, Selenide, and Spock—examining their prerequisites, strengths, weaknesses, and ideal use cases when integrated with Selenium WebDriver for UI and BDD testing.

JBehaveJUnitSelenide
0 likes · 13 min read
How to Pick the Best Java Testing Framework for Selenium Automation
FunTester
FunTester
Nov 19, 2019 · Backend Development

Why Skipping Unit Tests Costs More: Java and Groovy Examples

The article explains why many developers avoid unit testing despite its importance, demonstrates a Java method for filtering unpromised tools in a home‑renovation app, provides complete JUnit and Groovy/Spock test implementations, and shows how richer output from Groovy/Spock can speed debugging.

GroovyJUnitMockito
0 likes · 10 min read
Why Skipping Unit Tests Costs More: Java and Groovy Examples
Programmer DD
Programmer DD
Oct 23, 2019 · Backend Development

Master Spring Boot Testing: Unit and Integration Tests with JUnit, Hamcrest, and MockMvc

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
Master Spring Boot Testing: Unit and Integration Tests with JUnit, Hamcrest, and MockMvc
Programmer DD
Programmer DD
Sep 25, 2019 · Fundamentals

Master JUnit 5: Essential Guide to Java Unit Testing with Real Code Examples

This article introduces JUnit 5, explains its architecture and key features, and provides step‑by‑step examples of writing, configuring, and running unit tests in Java, covering annotations, lifecycle methods, disabled tests, nested tests, repeated tests, assertions, timeout checks, exception handling, and parameterized testing.

JUnitJUnit 5Java unit testing
0 likes · 17 min read
Master JUnit 5: Essential Guide to Java Unit Testing with Real Code Examples
Programmer DD
Programmer DD
Jun 30, 2019 · Backend Development

Master Spring Boot Auto-Configuration Tests with ApplicationContextRunner

This tutorial explains how to use Spring Boot's ApplicationContextRunner to simplify testing of auto‑configuration classes, covering class, bean, and property conditions with concrete code examples and assertions for both present and missing scenarios.

ApplicationContextRunnerJUnitSpring Boot
0 likes · 8 min read
Master Spring Boot Auto-Configuration Tests with ApplicationContextRunner
Senior Brother's Insights
Senior Brother's Insights
May 3, 2019 · Backend Development

How Spring Boot Detects the Main Application Class Using StackTrace

Spring Boot determines the main application class by creating a RuntimeException, inspecting its stack trace for a method named 'main', and loading the corresponding class via Class.forName, a process illustrated with source code and a JUnit test that compares printed stack traces to the thrown exception.

JUnitMainClassDetectionSpringBoot
0 likes · 7 min read
How Spring Boot Detects the Main Application Class Using StackTrace
Programmer DD
Programmer DD
Apr 25, 2018 · Backend Development

How Consumer‑Driven Contract Testing Transforms Distributed Microservice Development with Spring Cloud Contract

This article explains the shortcomings of traditional distributed microservice testing, introduces consumer‑driven contract testing, outlines the evolution of a distributed R&D model, and provides a step‑by‑step guide with code samples for implementing Spring Cloud Contract in both provider and consumer services.

Consumer-Driven ContractsJUnitMicroservices
0 likes · 13 min read
How Consumer‑Driven Contract Testing Transforms Distributed Microservice Development with Spring Cloud Contract
Tencent Music Tech Team
Tencent Music Tech Team
Jan 19, 2017 · Mobile Development

Android UI Automation Testing with Espresso Framework

The article introduces Google’s Espresso framework for Android UI automation, explains how to configure Gradle dependencies and the test runner, and guides developers through writing robust test cases by locating views, performing actions, and asserting states with onView().perform().check(), including a complete @Rule‑based example.

AndroidAndroid StudioEspresso
0 likes · 8 min read
Android UI Automation Testing with Espresso Framework