# JUnit 5 "must declare at least one ArgumentsSource" - Fix

> Fix JUnit 5 "Configuration error: ... must declare at least one ArgumentsSource" / "junit-jupiter-params not found" in CI - a @ParameterizedTest has no source, or the params artifact is missing.

Source: https://latchkey.dev/learn/java-jvm/junit5-parameterized-no-arguments-source-in-ci  
Updated: 2026-06-26

A JUnit 5 `@ParameterizedTest` ran with no argument source. Either you forgot the `@ValueSource`/`@MethodSource`/`@CsvSource` annotation, or `junit-jupiter-params` is not on the test classpath so the parameterized infrastructure is absent.

## Diagnose it: resolve the effective POM first

Maven merges parent POMs, profiles, and settings before it builds anything. The configuration causing your failure is frequently inherited or activated by a profile that is on locally and off in CI.

```Terminal
# the fully resolved configuration Maven will actually use
mvn help:effective-pom | head -60

# which profiles are active here vs on your machine?
mvn help:active-profiles

# full error, offline-safe, no colour codes to confuse the log
mvn -B -e -X <goal> 2>&1 | tail -60
```

> Always pass `-B` (batch mode) in CI. Without it Maven emits interactive progress output that bloats logs and can hang on a prompt.

## FAQ

### What causes JUnit 5 "must declare at least one ArgumentsSource"?

There are 3 common causes: no arguments-source annotation, junit-jupiter-params not on the classpath, and a @methodsource that resolves to nothing. The method is @ParameterizedTest but lacks @ValueSource/@MethodSource/@CsvSource, so JUnit has nothing to feed it.

### How do I fix JUnit 5 "must declare at least one ArgumentsSource"?

There are 3 fixes depending on which cause you have: add an arguments source, add junit-jupiter-params, and fix a @methodsource factory. Work through them in order, since the first is the most common.

### What does JUnit 5 "must declare at least one ArgumentsSource" actually mean?

The test errors (not fails) with Configuration error: You must configure at least one set of arguments for this @ParameterizedTest or org.junit.jupiter.params...

### How do I stop JUnit 5 "must declare at least one ArgumentsSource" happening again?

Always pair @ParameterizedTest with an explicit arguments source. The prevention section lists 3 changes that keep it from recurring.

---

Latchkey runs CI/CD that repairs its own failures. Agent entry points: https://latchkey.dev/agent.txt, https://latchkey.dev/openapi.json, https://latchkey.dev/llms.txt
