karatelabs/karate · info
DRY RUN — nothing was executed
Error message
DRY RUN — nothing was executed
What it means
Like error 827, this is a status string, not an error: in SuiteResult.printSummary(), when a dry run completes with no scenario failures, the scenarios line prints 'DRY RUN — nothing was executed' instead of 'all passed', so nobody mistakes a dry run for a real green suite.
Solutions
- Set dryRun(false) (or drop the flag) to actually execute scenarios
- Use the dry-run output deliberately as a pre-flight check before the real run in the pipeline
- Surface the summary status in CI logs so a 'DRY RUN' line is visible to reviewers
Example fix
// before // CI step: mvn test -Dkarate.dryRun=true (always) // after: separate preflight and real steps // mvn test -Dkarate.dryRun=true # preflight parse check // mvn test # real execution
Defensive patterns
Strategy: validation
Validate before calling
SuiteResult r = Runner.path("classpath:features").outputHtmlReport(true).parallel(2); // no .dryRun(true)
if (r.getScenarioCount() == 0) throw new AssertionError("no scenarios executed"); Type guard
function ranForReal(res){ return !res.isDryRun() && res.getScenarioCount() > 0; } Prevention
- Search your runner setup for dryRun(true) left over from debugging
- Gate releases on runs whose summary says 'all passed', not 'DRY RUN'
- Make dry-run a separate, clearly named pipeline step
- Assert executed-scenario counts in CI to catch silently skipped runs
When it happens
Trigger: Suite finished as a dry run (dryRun flag on Runner/Suite) and printSummary is called with scenarioFailed == 0; skipped scenarios counted as passed by design.
Common situations: Verifying feature files parse and tag filters resolve before a real run; a CI pipeline that intended real tests but the dry-run option stayed enabled in shared setup code.
Related errors
AI-assisted analysis of karatelabs/karate@a22eb90246 (2026-09-12).
Data as JSON: /api/errors/a46d60b47e53d8b2.
Report an issue: GitHub.
Appendix: source
Thrown at karate-core/src/main/java/io/karatelabs/core/SuiteResult.java:320
int featurePassed = getFeaturePassedCount();
int featureFailed = getFeatureFailedCount();
// a dry run cannot fail (nothing runs) and its skips count as passed — printing "all passed" for it
// would report a green for a suite that never touched the system under test
String featureStatus = featureFailed > 0
? Console.fail(featureFailed + " failed")
: dryRun ? Console.warn("parsed only") : Console.pass("all passed");
Console.println(String.format("features: %4d | passed: %4d | %s",
featureTotal, featurePassed, featureStatus));
// Scenario stats
int scenarioTotal = getScenarioCount();
int scenarioPassed = getScenarioPassedCount();
int scenarioFailed = getScenarioFailedCount();
int scenarioSkipped = getScenarioSkippedCount();
String scenarioStatus = scenarioFailed > 0
? Console.fail(scenarioFailed + " failed")
: dryRun ? Console.warn("DRY RUN — nothing was executed") : Console.pass("all passed");
if (scenarioSkipped > 0) {
Console.println(String.format("scenarios: %3d | passed: %4d | skipped: %4d | %s",
scenarioTotal, scenarioPassed, scenarioSkipped, scenarioStatus));
} else {
Console.println(String.format("scenarios: %3d | passed: %4d | %s",
scenarioTotal, scenarioPassed, scenarioStatus));
}
// Footer with version, env, and HTML report (URL last for easy clicking)
Console.println(Console.cyan("-".repeat(60)));
StringBuilder footer = new StringBuilder("Karate " + Globals.KARATE_VERSION);
if (env != null && !env.isEmpty()) {
footer.append(" | env: ").append(Console.cyan(env));
}
if (reportUrl != null) {
footer.append(" | HTML report:");
Console.println(footer.toString());View on GitHub (pinned to a22eb90246)