Setup & Installation
npx skills add https://github.com/LambdaTest/agent-skills --skill junit-5-skill
https://github.com/LambdaTest/agent-skills/tree/main/junit-5-skill
View on GitHubWhat This Skill Does
Generates JUnit 5 unit and integration tests for Java projects. Covers standard assertions, parameterized tests, Mockito mocking, nested test structures, and lifecycle hooks.
Produces ready-to-run test files with correct imports, annotations, and Mockito wiring instead of copying boilerplate from docs each time.
When to use it
- Writing parameterized tests with @CsvSource or @MethodSource for multiple input combinations
- Setting up Mockito mocks and verifying service-layer interactions
- Structuring related test cases into nested classes with @Nested and @DisplayName
- Testing exception paths with assertThrows and grouped assertAll blocks
- Scaffolding a new JUnit 5 test class with lifecycle hooks and correct Maven dependencies