diff --git a/src/test/java/org/elasticsearch/test/rest/junit/RestTestSuiteRunner.java b/src/test/java/org/elasticsearch/test/rest/junit/RestTestSuiteRunner.java index 61cabe6ccd7..a3321b44c97 100644 --- a/src/test/java/org/elasticsearch/test/rest/junit/RestTestSuiteRunner.java +++ b/src/test/java/org/elasticsearch/test/rest/junit/RestTestSuiteRunner.java @@ -336,6 +336,10 @@ public class RestTestSuiteRunner extends ParentRunner { } } + if (rootDescription.getChildren().size() == 0) { + throw new InitializationError("No tests to run"); + } + if (!parseExceptions.isEmpty()) { throw new InitializationError(parseExceptions); }