jvm-unit-tests
БесплатноБез исполняемых скриптовНе проверенUse whenever the task is to write, add, fix or review JVM unit tests in Java, Kotlin, Scala or Groovy: JUnit 6 (Jupiter) by default and JUnit 5 upgrades, plus…
от testland★ 18 звёзд на GitHubОб этом скилле
jvm-unit-tests
Overview
Per junit.org, "JUnit 6 is the current generation of the JUnit testing framework" (6.1.3 on Maven Central, 3 Nov 2026). Per the JUnit overview, a release is "JUnit Platform + JUnit Jupiter + JUnit Vintage":
- JUnit Jupiter - the programming + extension model (
org.junit.jupiter.*; the package names did not change from JUnit 5) - JUnit Vintage - runs JUnit 3/4 tests; per the overview it is "deprecated and should only be used temporarily while migrating"
- JUnit Platform - runner foundation (also hosts Kotest, Spock 2)
This skill targets JUnit Jupiter as the JVM default, with the
language-specific alternatives as references. Lifecycle scope
(configure / run / parameterize / coverage / CI); test code hygiene is in
test-code-conventions (qa-test-review).
Choosing a framework
- Match the existing convention first. Grep the build file for
dependency tokens:
junit-jupiter→ JUnit Jupiter (5.x or 6.x, check the version);io.kotest:kotest-runner-junit5→ Kotest;org.spockframework:spock-core→ Spock;org.scalatest:scalatest→ ScalaTest;org.testng:testng→ TestNG. If exactly one is present, match it - switching frameworks mid-build multiplies CI complexity for no quality gain. - No convention yet - decide by primary source language:
| Language | Framework | Why |
|---|---|---|
| Java (new project) | JUnit 6 (Jupiter) | The JVM standard; starter templates for Maven and Gradle (j5-ug) |
| Kotlin (Kotlin-only) | Kotest | Kotlin-idiomatic DSL, matchers, coroutines (kotest.io) → references/kotest.md |
| Kotlin + Java modules | JUnit 6 (Jupiter) | Cross-language support; one runner for both |
| Groovy | Spock | "a testing and specification framework for Java and Groovy applications" (spockframework.org) → references/spock.md |
| Scala | ScalaTest | "the most flexible and most popular testing tool in the Scala ecosystem" (scalatest.org) → references/scalatest.md |
| Java (legacy TestNG codebase) | TestNG | Match the existing convention; method dependencies + suite XML → references/testng.md |
Language detection from the build file: build.sbt / scalaVersion →
Scala; kotlin("jvm") plugin / kotlin-stdlib → Kotlin; id("groovy")
with no Kotlin plugin → Groovy; otherwise Java. Do not pick Spock for a
Java-only project (it drags in the Groovy compiler) or ScalaTest for
Java/Kotlin.
For richer assertions on JUnit / TestNG / Spock, pair with AssertJ → references/assertj.md.
Step 1 - Install (Maven / Gradle)
Import the BOM so Platform, Jupiter and Vintage stay on one version (setup from JUnit build support). JUnit 6 needs Java 17 or newer at runtime (overview); on Java 8 or 11, stay on JUnit 5.x until the JDK moves.
Maven pom.xml:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>6.1.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Per build support: "As of JUnit 6.0, the minimum required
version of Maven Surefire/Failsafe is 3.0.0." Pin
maven-surefire-plugin explicitly (3.6.1 is current); an old default
from a parent POM can skip every test without an error.
Gradle build.gradle.kts:
dependencies {
testImplementation(platform("org.junit:junit-bom:6.1.3"))
testImplementation("org.junit.jupiter:junit-jupiter")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
tasks.test {
useJUnitPlatform()
}
Upgrading from JUnit 5 to JUnit 6
Per the 6.0.0 release notes (September 30, 2025):
| Change in 6.0 | What to do |
|---|---|
| "Java 17 and Kotlin 2.1 baseline" | Raise the test JDK first (Gradle toolchain, maven.compiler.release, CI java-version). |
| "Single version number for Platform, Jupiter, and Vintage" | Replace separate junit-platform-* / junit-jupiter-* versions with the BOM above. |
junit-platform-runner removed, plus "various deprecated behaviors and APIs" |
Delete @RunWith(JUnitPlatform.class) suites; use @Suite from junit-platform-suite. Fix deprecation warnings on 5.x before the |
Установить jvm-unit-tests в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл jvm-unit-tests?
Use whenever the task is to write, add, fix or review JVM unit tests in Java, Kotlin, Scala or Groovy: JUnit 6 (Jupiter) by default and JUnit 5 upgrades, plus Kotest, Spock, ScalaTest and TestNG. Covers parameterized tests, lifecycle hooks, Mockito, AssertJ, JaCoCo coverage and Maven or Gradle CI.
Как установить скилл jvm-unit-tests?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл jvm-unit-tests запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic