run-tests

Execute targeted Gradle tests for staged files, pull requests, or modules.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/pepegar/nix-home --skill run-tests-pepegar
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: run-tests
Source: https://github.com/pepegar/nix-home/tree/main/skills/run-tests
Command: npx skills add https://github.com/pepegar/nix-home --skill run-tests-pepegar

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the process of running only the necessary Gradle tests based on code changes, significantly speeding up the feedback loop during development.

Core Features & Use Cases

  • Targeted Testing: Executes tests only for modules affected by staged or PR changes.
  • Mode Flexibility: Supports testing staged files, all PR files, or specific modules.
  • Use Case: Before committing, run tests for your staged changes to catch regressions early. When preparing a pull request, ensure all relevant tests pass by running them against the entire PR scope.

Quick Start

Run the tests for your staged code changes.

Frequently Asked Questions about run-tests

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

FAQPage Schema
How do I run only the Gradle tests for modules affected by my code changes?

You can run targeted Gradle tests by mapping Git diffs to Gradle module notation, which executes only the tests for staged files or specific modules affected by your modifications. This optimizes the testing process by skipping unaffected modules.

Can I run Gradle tests automatically for all files within a pull request?

Yes, you can run Gradle tests for all files within a pull request. The process leverages Git diffs and GitHub CLI to detect PR changes and maps those file paths to the corresponding Gradle modules for efficient test execution.

What is the best way to automate running targeted tests for staged files before committing?

Automating targeted tests for staged files involves mapping Git diff outputs to Gradle module notation. This catches regressions early by running only the necessary tests for your staged changes before you commit the code.

Do I need the GitHub CLI to run tests for specific Gradle modules?

You need the GitHub CLI to detect all files within a pull request scope. However, if you are only running tests for staged files or specific Gradle modules, the tool relies primarily on Git diffs to map file paths to module notation.

Why should I use targeted testing instead of running the entire Gradle test suite?

Targeted testing speeds up the feedback loop during development by executing only the necessary Gradle tests based on code modifications. This prevents wasting time running unaffected modules when preparing staged files or pull requests.

How does mapping file paths to Gradle module notation work for test execution?

Mapping file paths to Gradle module notation works by taking Git diff outputs and translating the modified file locations into the corresponding Gradle module structure, allowing the test runner to execute only the relevant module tests efficiently.