io.qameta.allure.cucumber2jvm.LabelBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of allure-cucumber2-jvm Show documentation
Show all versions of allure-cucumber2-jvm Show documentation
Module allure-cucumber2-jvm of Allure Framework.
package io.qameta.allure.cucumber2jvm;
import cucumber.api.TestCase;
import gherkin.ast.Feature;
import gherkin.pickles.PickleTag;
import io.qameta.allure.model.Label;
import io.qameta.allure.model.Link;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
import java.util.Deque;
import java.util.List;
import java.util.regex.Pattern;
import static io.qameta.allure.util.ResultsUtils.createFeatureLabel;
import static io.qameta.allure.util.ResultsUtils.createStoryLabel;
import static io.qameta.allure.util.ResultsUtils.createSeverityLabel;
import static io.qameta.allure.util.ResultsUtils.createTmsLink;
import static io.qameta.allure.util.ResultsUtils.createIssueLink;
import static io.qameta.allure.util.ResultsUtils.createLink;
import static io.qameta.allure.util.ResultsUtils.getHostName;
import static io.qameta.allure.util.ResultsUtils.getThreadName;
import static io.qameta.allure.util.ResultsUtils.createTagLabel;
/**
* Scenario labels and links builder.
*/
@SuppressWarnings({"CyclomaticComplexity", "PMD.CyclomaticComplexity", "PMD.NcssCount"})
class LabelBuilder {
private static final Logger LOGGER = LoggerFactory.getLogger(LabelBuilder.class);
private static final String COMPOSITE_TAG_DELIMITER = "=";
private static final String SEVERITY = "@SEVERITY";
private static final String ISSUE_LINK = "@ISSUE";
private static final String TMS_LINK = "@TMSLINK";
private static final String PLAIN_LINK = "@LINK";
private final List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy