diff --git a/allure-karate/src/main/java/io/qameta/allure/karate/AllureKarate.java b/allure-karate/src/main/java/io/qameta/allure/karate/AllureKarate.java index 79be5e9b..310d6c75 100644 --- a/allure-karate/src/main/java/io/qameta/allure/karate/AllureKarate.java +++ b/allure-karate/src/main/java/io/qameta/allure/karate/AllureKarate.java @@ -124,9 +124,12 @@ public boolean beforeScenario(final ScenarioRuntime sr) { } private static String getName(final Scenario scenario, final String defaultValue) { - return Objects.isNull(scenario.getName()) || scenario.getName().trim().isEmpty() - ? defaultValue - : scenario.getName().trim(); + if (Objects.isNull(scenario.getName())) { + return defaultValue; + } + final boolean blank = scenario.getName().chars() + .allMatch(Character::isWhitespace); + return blank ? defaultValue : scenario.getName().trim(); } @Override