unit-test-parameterized
JUnit 5 parameterized testing patterns for running single test methods with multiple input combinations.
Works with
0
total installs
0
this week
194
GitHub stars
0
upvotes
Install Skill
Run in your terminal
0
installs
0
this week
194
stars
What it does
Supports multiple data sources: @ValueSource for simple values, @CsvSource for tabular data, @MethodSource for complex objects, @EnumSource for enum testing, and custom ArgumentsProvider implementations
Includes boundary value testing, edge case coverage, and systematic validation of multiple scenarios with reduced test duplication
Offers custom display names for readable test out
Installation Guide
How to use unit-test-parameterized on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your machine
- ›Node.js 16+ with npm — verify with
node --version - ›Active project directory where you want to add
unit-test-parameterized
Run the install command
Execute the skills CLI command in your project's root directory to begin installation:
Fetches unit-test-parameterized from giuseppe-trisciuoglio/developer-kit and configures it for Cursor.
Select Cursor when prompted
The CLI shows a list of agents. Use arrow keys and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Restart Cursor to activate unit-test-parameterized. Access via /unit-test-parameterized in your agent's command palette.
Security Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
Documentation
Parameterized Unit Tests with JUnit 5
Overview
Provides patterns for parameterized unit tests in Java using JUnit 5. Covers @ValueSource, @CsvSource, @MethodSource, @EnumSource, @ArgumentsSource, and custom display names. Reduces test duplication by running the same test logic with multiple input values.
When to Use
- Writing JUnit tests with multiple input combinations
- Implementing data-driven tests in Java
- Running same test with different values (boundary analysis)
- Testing multiple scenarios from single test method
Instructions
- Add dependency: Ensure
junit-jupiter-paramsis on test classpath (included injunit-jupiter) - Choose source:
@ValueSourcefor simple values,@CsvSourcefor tabular data,@MethodSourcefor complex objects - Match parameters: Test method parameters must match data source types
- Set display names: Use
name = "{0}..."for readable output - Validate: Run
./gradlew test --infoormvn testand verify all parameter combinations execute
Examples
Maven / Gradle Dependency
JUnit 5 parameterized tests require junit-jupiter (includes params). Add assertj-core for assertions:
<!-- Maven -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
// Gradle
testImplementation("org.junit.jupiter:junit-jupiter")
@ValueSource — Simple Values
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
import static org.assertj.core.api.Assertions.*;
@ParameterizedTest
@ValueSource(strings = {"hello", "world", "test"})
void shouldCapitalizeAllStrings(String input) {
assertThat(StringUtils.capitalize(input)).isNotEmpty();
}
@ParameterizedTest
@ValueSource(ints = {1, 2, 3, 4, 5})
void shouldBePositive(int number) {
assertThat(number).isPositive();
}
@ParameterizedTest
@ValueSource(ints = {Integer.MIN_VALUE, -1, 0, 1, Integer.MAX_VALUE})
void shouldHandleBoundaryValues(int value) {
assertThat(Math.incrementExact(value)).isGreaterThan(value);
}
@CsvSource — Tabular Data
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;
@ParameterizedTest
@CsvSource({
"[email protected], true",
"[email protected], true",
"invalid-email, false",
"user@, false",
"@example.com, false"
})
void shouldValidateEmailAddresses(String email, boolean expected) {
assertThat(UserValidator.isValidEmail(email)).isEqualTo(expected);
}
@MethodSource — Complex Data
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
import java.util.stream.Stream;
@ParameterizedTest
@MethodSource("additionTestCases")
void shouldAddNumbersCorrectly(int a, int b, int expected) {
assertThat(Calculator.add(a, b)).isEqualTo(expected);
}
static Stream<Arguments> additionTestCases() {
return Stream.of(
Arguments.of(1, 2, 3),
Arguments.of(0, 0, 0),
Arguments.of(-1, 1, 0),
Arguments.of(100, 200, 300)
);
}
@EnumSource — Enum Values
@ParameterizedTest
@EnumSource(Status.class)
void shouldHandleAllStatuses(Status status) {
assertThat(status).isNotNull();
}
@ParameterizedTest
@EnumSource(value = Status.class, names = {"ACTIVE", "INACTIVE"})
void shouldHandleSpecificStatuses(Status status) {
assertThat(status).isIn(Status.ACTIVE, Status.INACTIVE);
}
Custom Display Names
@ParameterizedTest(name = "Discount of {0}% should be calculated correctly")
@ValueSource(ints = {5, 10, 15, 20})
void shouldApplyDiscount(int discountPercent) {
double result = DiscountCalculator.apply(100.0, discountPercent);
assertThat(resultList & Monetize Your Skill
Submit your Claude Code skill and start earning
Get started →Use Cases
Task Automation & Efficiency
Automate repetitive workflows and reduce manual effort
Example
Generate reports, summarize documents, draft communications
Save 3-5 hours per week on routine tasks
Knowledge Enhancement
Learn new skills, understand complex topics, get expert guidance
Example
Explain concepts, provide examples, suggest learning resources
Accelerate learning and skill development by 2x
Quality Improvement
Enhance output quality through reviews, suggestions, and refinements
Example
Review drafts, suggest improvements, catch errors
Improve work quality by 30-40% with less effort
Implementation Guide
Prerequisites
- ›Claude Desktop or compatible AI client with skill support
- ›Clear understanding of task or problem to solve
- ›Willingness to iterate and refine outputs
Time Estimate
15-45 minutes depending on use case complexity
Steps
- 1Install skill using provided installation command
- 2Test with simple use case relevant to your work
- 3Evaluate output quality and relevance
- 4Iterate on prompts to improve results
- 5Integrate into regular workflow if valuable
Common Pitfalls
- ⚠Expecting perfect results without iteration
- ⚠Not providing enough context in prompts
- ⚠Using skill for tasks outside its intended scope
- ⚠Accepting outputs without review and validation
Best Practices
✓ Do
- +Start with clear, specific prompts
- +Provide relevant context and constraints
- +Review and refine all outputs before using
- +Iterate to improve output quality
- +Document successful prompt patterns
✗ Don't
- −Don't use without understanding skill limitations
- −Don't skip validation of outputs
- −Don't share sensitive information in prompts
- −Don't expect skill to replace human judgment
💡 Pro Tips
- ★Be specific about desired format and style
- ★Ask for multiple options to choose from
- ★Request explanations to understand reasoning
- ★Combine AI efficiency with human expertise
When to Use This
✓ Use when
Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.
✗ Avoid when
Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.
Learning Path
- 1Familiarize yourself with skill capabilities and limitations
- 2Start with low-risk, non-critical tasks
- 3Progress to more complex and valuable use cases
- 4Build expertise through regular use and experimentation
Related Skills
tailwind-css-patterns
16giuseppe-trisciuoglio/developer-kit
nextjs-code-review
8giuseppe-trisciuoglio/developer-kit
nestjs-best-practices
6giuseppe-trisciuoglio/developer-kit
drizzle-orm-patterns
6giuseppe-trisciuoglio/developer-kit
graalvm-native-image
4giuseppe-trisciuoglio/developer-kit
polyglot-test-agent
11github/awesome-copilot
Reviews
- AAarav Singh★★★★★Dec 28, 2024
unit-test-parameterized has been reliable in day-to-day use. Documentation quality is above average for community skills.
- GGanesh Mohane★★★★★Dec 24, 2024
Registry listing for unit-test-parameterized matched our evaluation — installs cleanly and behaves as described in the markdown.
- BBenjamin Mensah★★★★★Dec 24, 2024
unit-test-parameterized fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- SShikha Mishra★★★★★Dec 20, 2024
We added unit-test-parameterized from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- FFatima Lopez★★★★★Dec 20, 2024
Useful defaults in unit-test-parameterized — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- AAanya Srinivasan★★★★★Dec 20, 2024
I recommend unit-test-parameterized for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- HHiroshi Bhatia★★★★★Dec 12, 2024
Solid pick for teams standardizing on skills: unit-test-parameterized is focused, and the summary matches what you get after install.
- VValentina Sharma★★★★★Nov 19, 2024
unit-test-parameterized reduced setup friction for our internal harness; good balance of opinion and flexibility.
- LLayla Reddy★★★★★Nov 15, 2024
We added unit-test-parameterized from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- YYash Thakker★★★★★Nov 11, 2024
unit-test-parameterized fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
showing 1-10 of 64
Discussion
Comments — not star reviews- No comments yet — start the thread.