diff --git a/allure-cucumber4-jvm/src/main/java/io/qameta/allure/cucumber4jvm/LabelBuilder.java b/allure-cucumber4-jvm/src/main/java/io/qameta/allure/cucumber4jvm/LabelBuilder.java index 465f4c1e3..e2eef37ed 100644 --- a/allure-cucumber4-jvm/src/main/java/io/qameta/allure/cucumber4jvm/LabelBuilder.java +++ b/allure-cucumber4-jvm/src/main/java/io/qameta/allure/cucumber4jvm/LabelBuilder.java @@ -24,6 +24,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.net.URI; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; @@ -162,7 +163,7 @@ private void tryHandleNamedLink(final String tagString) { } private String featurePackage(final String uri, final String featureName) { - final Path parent = Paths.get(uri).getParent(); + final Path parent = Paths.get(URI.create(uri).getSchemeSpecificPart()).getParent(); if (Objects.nonNull(parent)) { final Stream folders = StreamSupport.stream(parent.spliterator(), false) .map(Path::toString);