junit-team/junit5 · error · ParameterException
Missing required subcommand
Error message
Missing required subcommand
What it means
Error "Missing required subcommand" thrown in junit-team/junit5.
Source
Thrown at junit-platform-console/src/main/java/org/junit/platform/console/command/MainCommand.java:80
@Nullable
CommandResult<?> commandResult;
MainCommand(ConsoleTestExecutor.Factory consoleTestExecutorFactory) {
this.consoleTestExecutorFactory = consoleTestExecutorFactory;
}
@Override
public void run() {
if (helpRequested) {
commandSpec.commandLine().usage(commandSpec.commandLine().getOut());
commandResult = CommandResult.success();
}
else if (versionRequested) {
commandSpec.commandLine().printVersionHelp(commandSpec.commandLine().getOut());
commandResult = CommandResult.success();
}
else {
throw new ParameterException(commandSpec.commandLine(), "Missing required subcommand");
}
}
@Override
public int getExitCode() {
return requireNonNull(commandResult).getExitCode();
}
CommandResult<?> run(String[] args,
@SuppressWarnings("OptionalUsedAsFieldOrParameterType") Optional<OutputStreamConfig> outputStreamConfig) {
CommandLine commandLine = new CommandLine(this) //
.addSubcommand(new DiscoverTestsCommand(consoleTestExecutorFactory)) //
.addSubcommand(new ExecuteTestsCommand(consoleTestExecutorFactory)) //
.addSubcommand(new ListTestEnginesCommand());
return runCommand(commandLine, args, outputStreamConfig);
}
private static CommandResult<?> runCommand(CommandLine commandLine, String[] args,View on GitHub (pinned to 956246301e)
When it happens
Trigger: Thrown at junit-platform-console/src/main/java/org/junit/platform/console/command/MainCommand.java:80 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of junit-team/junit5@956246301e (2026-08-04).
Data as JSON: /data/errors/49ac0219a4ce3639.json.
Report an issue: GitHub.