java-test-updater

Triages failing JUnit tests in Java projects after code modifications.

1|2|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/santosomar/general-secure-coding-agent-skills --skill java-test-updater-santosomar
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: java-test-updater
Source: https://github.com/santosomar/general-secure-coding-agent-skills/tree/main/skills/testing/java-test-updater
Command: npx skills add https://github.com/santosomar/general-secure-coding-agent-skills --skill java-test-updater-santosomar

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers efficiently update failing JUnit tests in Java projects after code changes, distinguishing between genuine regressions and tests that need adjustment due to intentional behavior modifications or structural refactoring.

Core Features & Use Cases

  • Failure Triage: Differentiates between assertion failures and compilation errors.
  • Intentional Change Handling: Guides users on updating assertions when behavior has intentionally changed.
  • Over-coupling Identification: Helps identify and address tests that are too tightly coupled to implementation details.
  • Regression Detection: Emphasizes the importance of not auto-updating tests that correctly identify new bugs.

Quick Start

Use the java-test-updater skill to analyze and update failing Java tests in the current project directory.

Frequently Asked Questions about java-test-updater

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

FAQPage Schema
How do I fix failing JUnit tests after refactoring my Java project?▼

To fix failing JUnit tests after refactoring Java code, you must first distinguish between compilation errors and assertion failures. This skill guides you through applying mechanical fixes for compilation errors while providing a framework to triage assertion failures based on their root cause.

What is the best way to update Java tests without masking regressions?▼

The best way to update Java tests without masking regressions is to avoid auto-updating tests that correctly identify new bugs. This skill triages assertion failures to differentiate intentional behavior changes and over-mocked internals from genuine regressions, ensuring tests are updated appropriately based on the root cause.

Why do my JUnit tests fail when the implementation changes but the behavior is correct?▼

JUnit tests often fail during correct implementation changes due to over-coupled test structures tightly bound to implementation details. This skill helps identify and address over-mocked internals, allowing you to update assertions safely when behavior has intentionally changed without breaking the test framework.

Can I use this skill to handle compilation errors in my Java test suite?▼

Yes, you can use this skill to handle compilation errors in your Java test suite. It guides users through mechanical fixes for compilation errors in Java projects following code modifications, separating these structural issues from assertion failures to ensure a clear test maintenance workflow.

When should I not auto-update failing JUnit assertions?▼

You should not auto-update failing JUnit assertions when the failure represents a genuine regression caused by new bugs. This skill emphasizes preventing the accidental masking of bugs by ensuring tests are updated appropriately based on the root cause of their failure rather than blindly overwriting assertions.