JUnit 6
Complete guide to JUnit 6 with links to all articles covering getting started, core patterns, advanced techniques, mocking, extensions, integration testing, and best practices.
Complete guide to JUnit 6 with links to all articles covering getting started, core patterns, advanced techniques, mocking, extensions, integration testing, and best practices.
A practical guide to the modern Java test stack — JUnit 6 as the runner, AssertJ for fluent assertions, Mockito 5 for mocking, and Testcontainers for real infrastructure. Includes runnable examples for each and AI prompts to generate and refactor tests.
A practical guide to JUnit 6 nullability annotations via JSpecify: @Nullable, @NonNull, and @NullMarked. Covers what each annotation means, how they improve compile-time null safety, IDE and static analysis integration, Kotlin interop, and complete Java code examples for each annotation.
10 AI prompts for debugging and fixing broken, flaky, and incorrectly behaving JUnit 6 tests. Each prompt is structured to provide complete failure context — stack traces, test code, production code — and diagnose root causes across assertion errors, NPEs, Mockito issues, Spring context failures, Testcontainers problems, and more.
10 AI prompts to optimise, update, and improve existing JUnit 6 test classes. Covers refactoring for readability, JUnit 4 migration, removing unnecessary Spring contexts, fixing brittle mocks, adding boundary tests, consolidating duplicates, restructuring with @Nested, and full quality audits.
10 ready-to-use AI prompts to generate high-quality JUnit 6 test cases for new Java projects. Each prompt is engineered for GitHub Copilot, Claude, ChatGPT, or any LLM to produce complete, annotated, production-ready tests covering unit, integration, parameterized, and exception scenarios.
A comprehensive three-way comparison of JUnit 6, Spock, and TestNG. Covers syntax, data-driven tests, mocking, Spring Boot support, parallel execution, and ecosystem. Includes the same test written in all three frameworks and a clear decision guide for which to choose.
A clear explanation of the distinct roles of JUnit 6 and Mockito in Java testing. Covers what each tool does, how MockitoExtension bridges them, the division of responsibility between assertions and verification, and a complete responsibilities reference table.
A detailed, side-by-side comparison of JUnit 6 and TestNG: annotations, parameterized tests, test dependencies, parallel execution, assertions, Spring Boot integration, and ecosystem support. Includes real code examples for both frameworks and a decision guide.
A practical guide to AI-powered test generation for JUnit 6 projects. Covers GitHub Copilot, Diffblue Cover, and LLM prompting strategies. Includes real AI-generated test examples, a human review checklist, mutation testing validation, and a capability table for each AI tool.