diff --git a/core/src/main/java/cucumber/runtime/Runtime.java b/core/src/main/java/cucumber/runtime/Runtime.java index 3d9a204aa0..5e6983a53b 100644 --- a/core/src/main/java/cucumber/runtime/Runtime.java +++ b/core/src/main/java/cucumber/runtime/Runtime.java @@ -180,9 +180,11 @@ public void runAfterHooks(Reporter reporter, Set tags) { } private void runHooks(List hooks, Reporter reporter, Set tags, boolean isBefore) { - for (HookDefinition hook : hooks) { - runHookIfTagsMatch(hook, reporter, tags, isBefore); - } + if (!runtimeOptions.dryRun) { + for (HookDefinition hook : hooks) { + runHookIfTagsMatch(hook, reporter, tags, isBefore); + } + } } private void runHookIfTagsMatch(HookDefinition hook, Reporter reporter, Set tags, boolean isBefore) {