github avatar

Java Junit

This covers JUnit 5 fundamentals through advanced parameterized testing patterns. It's solid for teams standardizing on testing conventions or developers moving from JUnit 4 who need the new annotation syntax and parameterized test approaches. The guidance on @ParameterizedTest with @ValueSource, @CsvSource, and @MethodSource is thorough, plus it includes practical setup for Maven/Gradle dependencies. The test naming conventions and AAA pattern recommendations will help maintain readable test suites. One limitation: it focuses heavily on unit testing mechanics but doesn't dive into integration testing strategies or more complex mocking scenarios beyond basic Mockito usage.

install copies · 90 days. Times the install command was copied on this site in the last 90 days, bots filtered.
5
skills.sh installs
11.8K
GitHub stars
41K
last updated
Aug 21, 2026

Install

$ npx -y skills add github/awesome-copilot --skill java-junit --agent claude-code

Installs into .claude/skills of the current project.

Files

Java Testing with JUnit 5/6, AssertJ and Mockito

Framework-neutral guidance for fast, deterministic unit tests. For Spring slices use spring-boot-testing (if installed); for real databases/brokers in Docker use java-testcontainers; for failures you cannot explain, java-debugging.

First: detect, don't impose

  1. Read pom.xml/build.gradle*: JUnit version (junit-jupiter, junit-bom, or inherited from a Spring Boot BOM), assertion library, Mockito, Surefire/Failsafe versions, Java release.
  2. Copy the conventions already in src/test/java (naming, assertion library, static imports, mocking style). Do not introduce AssertJ, Mockito or JaCoCo into a project that lacks them without asking.
  3. Never bump the JUnit major version implicitly; upgrading is its own task (see java-upgrade if installed).

JUnit 5 vs JUnit 6

Sponsors

Details

Repository
github.com/github/awesome-copilot
Categories
Testing & QA, Git & Pull Requests, AI & Agent Building, Java & JVM

More from github/awesome-copilot

All 318
1wshobson avatarworkflow-patternswshobson/agentsUse this skill when implementing tasks according to Conductor's TDD workflow, handling phase checkpoints, managing git commits for tasks, or understanding the v11.4Kskills.sh installs
2wshobson avatarsast-configurationwshobson/agentsConfigure Static Application Security Testing (SAST) tools for automated vulnerability detection in application code. Use when setting up security scanning, imp11.2Kskills.sh installs
3github avatarcsharp-xunitgithub/awesome-copilotGet best practices for XUnit unit testing, including data-driven tests10.4Kskills.sh installs
4jeffallan avatarpython-projeffallan/claude-skillsUse when building Python 3.11+ applications requiring type safety, async programming, or robust error handling. Generates type-annotated Python code, configures9.1Kskills.sh installs
5github avatarcsharp-nunitgithub/awesome-copilotGet best practices for NUnit unit testing, including data-driven tests9Kskills.sh installs
6github avatarcsharp-mstestgithub/awesome-copilotGet best practices for MSTest 3.x/4.x unit testing, including modern assertion APIs and data-driven tests8.9Kskills.sh installs