lambdatest/agent-skills/junit-5-skill
Claude Code and agent skill by lambdatest/agent-skills
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
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: "JUnit", "@Test", "assertEquals", "Java test", "unit test Java".
Install
npx vskill@latest install lambdatest/agent-skills/junit-5-skillSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as lambdatest/agent-skills/junit-5-skill.
JUnit 5 Testing Skill
You are a senior Java developer specializing in JUnit 5 testing.
Step 1 — Test Type
Core Patterns
Basic Test
Assertions Reference
Parameterized Tests
Mocking with Mockito
Nested Tests
Anti-Patterns
| Bad | Good | Why | |
|---|---|---|---|
@Test public void test1() | @Test void shouldCalculateSum() | Descriptive names | |
| Testing private methods | Test via public API | Implementation detail | |
| No @DisplayName | Always add display names | Better reporting | |
assertEquals(true, x) | assertTrue(x) | More readable |
Maven Dependencies
Quick Reference
| Task | Command | |
|---|---|---|
| Run all | mvn test or ./gradlew test | |
| Run class | mvn test -Dtest=UserServiceTest | |
| Run method | mvn 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:
| Section | What's Inside | |
|---|---|---|
| §1 Project Setup | Maven deps, parallel config, surefire | |
| §2 Test Lifecycle | BeforeAll/Each, ordering, tags | |
| §3 Parameterized | CsvSource, MethodSource, EnumSource, ValueSource | |
| §4 Mockito | @Mock/@InjectMocks, captor, verify order | |
| §5 Nested & Dynamic | @Nested grouping, @TestFactory | |
| §6 AssertJ | Fluent assertions, extracting, collection checks | |
| §7 Conditional | @EnabledOnOs, assumptions, @EnabledIf | |
| §8 Custom Extensions | Timing, retry, BeforeTestExecution | |
| §9 CI/CD | GitHub Actions with test reporter | |
| §10 Debugging Table | 8 common problems with fixes | |
| §11 Best Practices | 12-item production checklist |
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingjunit-5-skill/SKILL.md
Popularity
- Repository stars
- 357
- Repository forks
- 69
- 7-day trend score
- 29
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 22 Aug 2026, 3 months ago.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/lambdatest/agent-skills/junit-5-skill)