java-tdd-guide

Guide Java teams through a Red-Green-Refactor Test-Driven Development workflow.

243|67|Updated Feb 1, 2021
One-click install
npx skills add https://github.com/bernardladenthin/BitcoinAddressFinder --skill java-tdd-guide
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: java-tdd-guide
Source: https://github.com/bernardladenthin/BitcoinAddressFinder/tree/main/.claude/skills/java-tdd-guide
Command: npx skills add https://github.com/bernardladenthin/BitcoinAddressFinder --skill java-tdd-guide

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Java development often lacks consistent testing discipline. This skill provides a practical, project-agnostic guide to applying Test-Driven Development in Java, helping teams establish a repeatable Red → Green → Refactor workflow and reduce defect rates.

Core Features & Use Cases

  • Red → Green → Refactor workflow: describes the cycle, along with examples and project-agnostic conventions.
  • Test structure & conventions: guidelines for test file layout, naming, editor folds, and assertion style to maintain readability and consistency.
  • Tooling & practices: coverage of JUnit 4, Hamcrest, Mockito usage, data providers, and null-safety annotations to support robust unit tests.

Quick Start

Start by writing a failing test, then implement the minimal production code to pass, and finally refactor for readability.

Frequently Asked Questions about java-tdd-guide

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement a Red-Green-Refactor workflow for Java unit testing?

A Java TDD workflow follows the Red-Green-Refactor cycle: write a failing test first, implement minimal production code to pass, then refactor for readability and maintainability.

What naming conventions and test layout should I use for Java TDD?

Java TDD conventions cover structured test file layout, clear naming conventions, editor folds, and assertion style to maintain readability and consistency across project teams.

How do I use Mockito and Hamcrest for mocking and data-driven testing in Java?

Java TDD practices use JUnit 4, Hamcrest, and Mockito to support robust unit tests, incorporating data providers and null-safety annotations for data-driven testing approaches.

Does this Java TDD guide work with any Java project or does it require specific dependencies?

The Java TDD guide is project-agnostic and has no external dependencies, applying to individual developers and teams practicing unit testing and refactoring across typical Java projects.

Why do I need static analysis practices in Java Test-Driven Development?

Static analysis practices in Java TDD ensure robust, maintainable tests by enforcing structured test layout and clear conventions, reducing defect rates and testing inconsistencies.