Agent skill

Junit 5 Skill

by sickn33 in sickn33/agentic-awesome-skills

Generates production-grade JUnit 5 unit and integration tests in Java.

MITAuto-check passedTesting & QA

Install Junit 5 Skill

skills CLI
$ npx skills add sickn33/agentic-awesome-skills --skill junit-5-skill -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sickn33/agentic-awesome-skills junit-5-skill --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sickn33/agentic-awesome-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/junit-5-skill .claude/skills/junit-5-skill && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
junit-5-skill
GitHub stars
47k
Used in
1 other repo
Token cost
~1.8k tokens
SKILL.md length
286 words
Files
1
Skills in repo
1,493
Repo updated
First seen
Licence
MIT

At a glance

Generates production-grade JUnit 5 unit and integration tests in Java.

  • User mentions JUnit
  • SKILL.md covers When to Use, Step 1 — Test Type, Core Patterns and Maven Dependencies, plus 3 more sections
  • Calls mvn
  • Tasks that involve Unit testing

What it does

Junit 5 Skill is an agent skill from sickn33/agentic-awesome-skills. Generates production-grade JUnit 5 unit and integration tests in Java. Covers assertions, parameterized tests, lifecycle hooks, mocking with Mockito, and nested tests. Use when user mentions "JUnit", "JUnit 5", "@Test", "assertEquals", "Assertions", "Java unit test".

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Testing & QA, covering Unit testing and Integration testing. It works with JUnit and Java. The repository describes itself as: AAS Core is the local, agent-first control plane for complete catalog discovery, agent-owned selection, stack validation, and planning, backed by 2,400+ agentic skills. Includes… The licence is MIT.

When your agent uses it

  • User mentions JUnit
  • Tasks that involve Unit testing
  • Tasks that involve Integration testing

Example prompts

  • “JUnit 5”
  • “assertEquals”
  • “Assertions”
  • “/junit-5-skill”

What it can do on your machine

Read from SKILL.md and the folder at commit 680176d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • mvn

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Junit 5 Skill loads about 1.8k tokens when it runs. Until then it costs about 70 tokens; SKILL.md has 286 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~70
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from sickn33/agentic-awesome-skills at commit 680176d, republished under its MIT licence (© sickn33). 286 words, ~1,807 tokens.

Download SKILL.mdSave it as .claude/skills/junit-5-skill/SKILL.md (or your agent's skills folder).
name
junit-5-skill
description
Generates production-grade JUnit 5 unit and integration tests in Java. Covers assertions, parameterized tests, lifecycle hooks, mocking with Mockito, and nested tests. Use when user mentions "JUnit", "JUnit 5", "@Test", "assertEquals", "Assertions", "Java unit test".
risk
critical
source
https://github.com/LambdaTest/agent-skills/tree/main/junit-5-skill
source_repo
LambdaTest/agent-skills
source_type
community
date_added
2026-07-01
license
MIT
license_source
https://github.com/LambdaTest/agent-skills/blob/main/LICENSE

JUnit 5 Testing Skill

When to Use

Use this skill when you need generates production-grade JUnit 5 unit and integration tests in Java. Covers assertions, parameterized tests, lifecycle hooks, mocking with Mockito, and nested tests. Use when user mentions "JUnit", "JUnit 5", "@Test", "assertEquals", "Assertions", "Java unit test". Triggers on:...

You are a senior Java developer specializing in JUnit 5 testing.

Step 1 — Test Type

├─ "unit test", "assert" → Standard unit test
├─ "parameterized", "multiple inputs" → @ParameterizedTest
├─ "mock", "Mockito" → Unit test with Mockito
├─ "integration test", "Spring" → Read reference/spring-integration.md
└─ Default → Standard unit test

Core Patterns

Basic Test
java
import org.junit.jupiter.api.*;
import static org.junit.jupiter.api.Assertions.*;

class CalculatorTest {
    private Calculator calculator;

    @BeforeEach
    void setUp() {
        calculator = new Calculator();
    }

    @Test
    @DisplayName("Addition of two positive numbers")
    void addPositiveNumbers() {
        assertEquals(5, calculator.add(2, 3));
    }

    @Test
    void divideByZero_throwsException() {
        assertThrows(ArithmeticException.class, () -> calculator.divide(10, 0));
    }

    @Test
    void multipleAssertions() {
        assertAll("calculator operations",
            () -> assertEquals(4, calculator.add(2, 2)),
            () -> assertEquals(0, calculator.subtract(2, 2)),
            () -> assertEquals(6, calculator.multiply(2, 3))
        );
    }
}
Assertions Reference
java
assertEquals(expected, actual);
assertNotEquals(unexpected, actual);
assertTrue(condition);
assertFalse(condition);
assertNull(object);
assertNotNull(object);
assertThrows(IllegalArgumentException.class, () -> service.process(null));
assertTimeout(Duration.ofSeconds(2), () -> service.longRunningOp());
assertAll("group",
    () -> assertNotNull(user.getName()),
    () -> assertTrue(user.getAge() > 0)
);
assertIterableEquals(List.of(1, 2, 3), actualList);
Parameterized Tests
java
@ParameterizedTest
@ValueSource(strings = {"hello", "world", "junit"})
void stringIsNotEmpty(String value) {
    assertFalse(value.isEmpty());
}

@ParameterizedTest
@CsvSource({"1,1,2", "2,3,5", "10,-5,5"})
void addNumbers(int a, int b, int expected) {
    assertEquals(expected, calculator.add(a, b));
}

@ParameterizedTest
@MethodSource("provideUsers")
void validateUser(String name, int age, boolean expected) {
    assertEquals(expected, validator.isValid(name, age));
}

static Stream<Arguments> provideUsers() {
    return Stream.of(
        Arguments.of("Alice", 25, true),
        Arguments.of("", 25, false),
        Arguments.of("Bob", -1, false)
    );
}

@ParameterizedTest
@NullAndEmptySource
@ValueSource(strings = {"  ", "\t"})
void blankStringsAreInvalid(String input) {
    assertFalse(validator.isValid(input));
}
Mocking with Mockito
java
@ExtendWith(MockitoExtension.class)
class UserServiceTest {
    @Mock private UserRepository userRepo;
    @Mock private EmailService emailService;
    @InjectMocks private UserService userService;

    @Test
    void createUser_savesAndSendsEmail() {
        User user = new User("alice@test.com", "Alice");
        when(userRepo.save(any(User.class))).thenReturn(user);

        User result = userService.createUser("alice@test.com", "Alice");

        assertNotNull(result);
        verify(userRepo).save(any(User.class));
        verify(emailService).sendWelcomeEmail("alice@test.com");
    }

    @Test
    void getUser_notFound_throwsException() {
        when(userRepo.findById(99L)).thenReturn(Optional.empty());
        assertThrows(UserNotFoundException.class, () -> userService.getUser(99L));
    }
}
Nested Tests
java
@DisplayName("UserService")
class UserServiceTest {
    @Nested
    @DisplayName("when creating a user")
    class CreateUser {
        @Test void withValidData_succeeds() { }
        @Test void withDuplicateEmail_throwsException() { }
    }

    @Nested
    @DisplayName("when deleting a user")
    class DeleteUser {
        @Test void existingUser_removesFromDb() { }
        @Test void nonExistentUser_throwsException() { }
    }
}
Anti-Patterns
BadGoodWhy
@Test public void test1()@Test void shouldCalculateSum()Descriptive names
Testing private methodsTest via public APIImplementation detail
No @DisplayNameAlways add display namesBetter reporting
assertEquals(true, x)assertTrue(x)More readable

Maven Dependencies

xml
<dependency>
    <groupId>org.junit.jupiter</groupId>
    <artifactId>junit-jupiter</artifactId>
    <version>5.11.0</version>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>org.mockito</groupId>
    <artifactId>mockito-junit-jupiter</artifactId>
    <version>5.14.0</version>
    <scope>test</scope>
</dependency>

Quick Reference

TaskCommand
Run allmvn test or ./gradlew test
Run classmvn test -Dtest=UserServiceTest
Run methodmvn test -Dtest=UserServiceTest#createUser_succeeds
Run tagged@Tag("slow") + mvn test -Dgroups="slow"
Disable@Disabled("Reason")
Conditional@EnabledOnOs(OS.LINUX)
Timeout@Timeout(value = 5, unit = TimeUnit.SECONDS)
Repeated@RepeatedTest(5)
Order@TestMethodOrder(MethodOrderer.OrderAnnotation.class)

Deep Patterns

For production-grade patterns, see reference/playbook.md:

SectionWhat's Inside
§1 Project SetupMaven deps, parallel config, surefire
§2 Test LifecycleBeforeAll/Each, ordering, tags
§3 ParameterizedCsvSource, MethodSource, EnumSource, ValueSource
§4 Mockito@Mock/@InjectMocks, captor, verify order
§5 Nested & Dynamic@Nested grouping, @TestFactory
§6 AssertJFluent assertions, extracting, collection checks
§7 Conditional@EnabledOnOs, assumptions, @EnabledIf
§8 Custom ExtensionsTiming, retry, BeforeTestExecution
§9 CI/CDGitHub Actions with test reporter
§10 Debugging Table8 common problems with fixes
§11 Best Practices12-item production checklist

Limitations

  • Use this skill only when the task clearly matches its upstream source and local project context.
  • Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.
  • Do not treat examples as a substitute for environment-specific tests, security review, or user approval for destructive or costly actions.

© sickn33, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/junit-5-skill of sickn33/agentic-awesome-skills.

Open the folder on GitHubat commit 680176d

Used in 1 other repository

We found 5 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in sickn33/agentic-awesome-skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Junit 5 Skill next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Junit 5 Skill compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Junit 5 Skill this skillsickn33/agentic-awesome-skills47k1 repos~1.8kAutomated safety check: PassMIT
Debug Surefireeclipse-rdf4j/rdf4j420—~2.4kAutomated safety check: PassBSD-3-Clause
Validationjosstei/maestro-orchestrate465—~2.3kAutomated safety check: PassApache-2.0
Minecraft TestingJahrome907/minecraft-agent-skills169—~3.8kAutomated safety check: PassMIT
Eclipse Testgradusnikov/eclipse-chatgpt-plugin172—~1kAutomated safety check: PassMIT
Unit TestingLeavesfly/Jimi237—~667Automated safety check: PassNone

Similar skills

  • Debug Surefire

    eclipse-rdf4j/rdf4j

    Debug Maven Surefire unit tests by running them in JDWP "wait for debugger" mode (-Dmaven.surefire.debug) and attaching to the forked test JVM using jdb (preferred for CLI/agent debugging)…

    420 GitHub stars~2.4k tokensUpdated today
    Testing & QAAuto-check passed
  • Validation

    josstei/maestro-orchestrate

    Cross-cutting validation methodology for verifying phase outputs and project integrity

    465 GitHub stars~2.3k tokensUpdated 2 days ago
    Testing & QAAuto-check passed
  • Minecraft Testing

    Jahrome907/minecraft-agent-skills

    Design and implement automated tests for current Minecraft 26.x or legacy 1.21.x mods and plugins using JUnit, MockBukkit, NeoForge Game Tests, or Fabric Game Tests.

    169 GitHub stars~3.8k tokensUpdated 26 days ago
    Testing & QAAuto-check passed
  • Eclipse Test

    gradusnikov/eclipse-chatgpt-plugin

    Run JUnit tests in Eclipse projects — all tests, by package, by class, or individual test methods.

    172 GitHub stars~1k tokensUpdated today
    Testing & QAAuto-check passed
  • Unit Testing

    Leavesfly/Jimi

    Java单元测试编写指南(基于JUnit和Mockito)

    237 GitHub stars~667 tokensUpdated 1 mo ago
    Testing & QAAuto-check passed
  • Official

    Convert JUnit 5 @MethodSource/@CsvSource/@ValueSource parameterized tests to @TableTest (JDK8)

    736 GitHub stars~950 tokensUpdated today
    Testing & QAAuto-check passed

More from sickn33/agentic-awesome-skills

All 1,493 skills in this repo
  • Liuguang Banlan UI

    sickn33/agentic-awesome-skills

    Implements an interface in one of two named color modes, iridescent white or colorful black, from a parameterized starter that reports measured color intensity.

    47k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • User Thoughts Memory

    sickn33/agentic-awesome-skills

    Saves a user's project decisions, rules and preferences into a project-local mdbase so later sessions and other agents can recover the intent.

    47k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Using LWC Memory and Graphs

    sickn33/agentic-awesome-skills

    Keeps project decisions, research and verified results available across coding-agent sessions through LWC memory, a document Wiki graph and a CodeGraph code index.

    47k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Find Complementary Founders

    sickn33/agentic-awesome-skills

    Guides an agent through assessing its own owner for cofounder fit, publishing an approved profile, and ranking complementary profiles other agents published for their owners.

    47k GitHub starsUsed in 1 repo~4.8k tokens
    Auto-check passed
  • Whatsapp Cloud API

    sickn33/agentic-awesome-skills

    Integracao com WhatsApp Business Cloud API (Meta). An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~4.5k tokens
    Auto-check passed
  • Cline Pilot

    sickn33/agentic-awesome-skills

    Acts as a proxy for the Cline CLI, dispatching coding tasks one at a time, monitoring runs by hard evidence, relaying decisions to you and learning per-project preferences.

    47k GitHub starsUsed in 1 repo~4.6k tokens
    Auto-check passed

Works with

Categories

Questions about Junit 5 Skill

What does Junit 5 Skill do?

Generates production-grade JUnit 5 unit and integration tests in Java. Junit 5 Skill is an agent skill from sickn33/agentic-awesome-skills. Generates production-grade JUnit 5 unit and integration tests in Java.

When should I use Junit 5 Skill?

Junit 5 Skill fits situations like: user mentions JUnit; tasks that involve Unit testing; tasks that involve Integration testing.

How do I install Junit 5 Skill in Claude Code?

Run `npx skills add sickn33/agentic-awesome-skills --skill junit-5-skill -a claude-code`. Or copy the skill folder (skills/junit-5-skill in sickn33/agentic-awesome-skills) into .claude/skills/junit-5-skill in your project. Claude Code loads it when a task matches its description.

How do I install Junit 5 Skill in Codex?

Run `npx skills add sickn33/agentic-awesome-skills --skill junit-5-skill -a codex`. Or copy the skill folder (skills/junit-5-skill in sickn33/agentic-awesome-skills) into .agents/skills/junit-5-skill in your project. Codex loads it when a task matches its description.

Can I use Junit 5 Skill in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sickn33/agentic-awesome-skills --skill junit-5-skill -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/junit-5-skill, .gemini/skills/junit-5-skill, .github/skills/junit-5-skill and .opencode/skills/junit-5-skill in your project.

What does Junit 5 Skill need to run?

Going by SKILL.md and its folder, Junit 5 Skill needs the command-line tools its instructions call (mvn).

Does Junit 5 Skill access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Junit 5 Skill safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Junit 5 Skill use?

Junit 5 Skill is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Junit 5 Skill use?

About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Junit 5 Skill?

Skills that share tags, products or a category with Junit 5 Skill: Debug Surefire (eclipse-rdf4j/rdf4j, 420 stars), Validation (josstei/maestro-orchestrate, 465 stars), Minecraft Testing (Jahrome907/minecraft-agent-skills, 169 stars) and Eclipse Test (gradusnikov/eclipse-chatgpt-plugin, 172 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Junit 5 Skill?

sickn33 (a GitHub user) maintains it in sickn33/agentic-awesome-skills, which has 47,379 GitHub stars. The repository holds 1,493 skills in this directory. The repository was last updated on October 9, 2026.

Source: sickn33/agentic-awesome-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.