소스 검색

upd QaseUtils

VladSenyuta 2 년 전
부모
커밋
cc429aee59

+ 2 - 2
kafka-ui-e2e-checks/README.md

@@ -41,13 +41,13 @@ docker-compose -f documentation/compose/e2e-tests.yaml up -d
 2. Run Smoke test suite using your QaseIO API token as environment variable (put instead %s into command below)
 2. Run Smoke test suite using your QaseIO API token as environment variable (put instead %s into command below)
 
 
 ```
 ```
-./mvnw -DQASEIO_API_TOKEN='%s' test -f 'kafka-ui-e2e-checks' -Dsurefire.suiteXmlFiles='src/test/resources/smoke.xml' -Pprod
+./mvnw -DQASEIO_API_TOKEN='%s' test -f 'kafka-ui-e2e-checks' -Dsurefire.suiteXmlFiles='src/test/resources/smoke.xml' -Dsuite=smoke -Pprod
 ```
 ```
 
 
 3. Run Regression test suite using your QaseIO API token as environment variable (put instead %s into command below)
 3. Run Regression test suite using your QaseIO API token as environment variable (put instead %s into command below)
 
 
 ```
 ```
-./mvnw -DQASEIO_API_TOKEN='%s' test -f 'kafka-ui-e2e-checks' -Dsurefire.suiteXmlFiles='src/test/resources/regression.xml' -Pprod
+./mvnw -DQASEIO_API_TOKEN='%s' test -f 'kafka-ui-e2e-checks' -Dsurefire.suiteXmlFiles='src/test/resources/regression.xml' -Dsuite=regression -Pprod
 ```
 ```
 
 
 4. To run tests on your local Chrome browser just add next VM option to the Run Configuration
 4. To run tests on your local Chrome browser just add next VM option to the Run Configuration

+ 11 - 17
kafka-ui-e2e-checks/pom.xml

@@ -15,17 +15,16 @@
         <maven.surefire-plugin.version>3.0.0-M8</maven.surefire-plugin.version>
         <maven.surefire-plugin.version>3.0.0-M8</maven.surefire-plugin.version>
         <kafka-ui-contract>${project.version}</kafka-ui-contract>
         <kafka-ui-contract>${project.version}</kafka-ui-contract>
         <testcontainers.version>1.17.6</testcontainers.version>
         <testcontainers.version>1.17.6</testcontainers.version>
-        <junit.platform.version>1.9.2</junit.platform.version>
         <selenide.version>6.6.3</selenide.version>
         <selenide.version>6.6.3</selenide.version>
         <testng.version>7.6.1</testng.version>
         <testng.version>7.6.1</testng.version>
         <allure.version>2.20.1</allure.version>
         <allure.version>2.20.1</allure.version>
+        <qase.io.version>3.0.2</qase.io.version>
         <aspectj.version>1.9.9.1</aspectj.version>
         <aspectj.version>1.9.9.1</aspectj.version>
         <assertj.version>3.23.1</assertj.version>
         <assertj.version>3.23.1</assertj.version>
         <hamcrest.version>2.2</hamcrest.version>
         <hamcrest.version>2.2</hamcrest.version>
         <slf4j.version>1.7.36</slf4j.version>
         <slf4j.version>1.7.36</slf4j.version>
         <dotenv.version>2.3.1</dotenv.version>
         <dotenv.version>2.3.1</dotenv.version>
         <kafka.version>3.3.1</kafka.version>
         <kafka.version>3.3.1</kafka.version>
-        <qase.io.version>2.1.3</qase.io.version>
     </properties>
     </properties>
 
 
     <dependencies>
     <dependencies>
@@ -121,16 +120,6 @@
             <artifactId>selenium</artifactId>
             <artifactId>selenium</artifactId>
             <version>${testcontainers.version}</version>
             <version>${testcontainers.version}</version>
         </dependency>
         </dependency>
-        <dependency>
-            <groupId>org.junit.platform</groupId>
-            <artifactId>junit-platform-launcher</artifactId>
-            <version>${junit.platform.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.junit.platform</groupId>
-            <artifactId>junit-platform-engine</artifactId>
-            <version>${junit.platform.version}</version>
-        </dependency>
         <dependency>
         <dependency>
             <groupId>com.codeborne</groupId>
             <groupId>com.codeborne</groupId>
             <artifactId>selenide</artifactId>
             <artifactId>selenide</artifactId>
@@ -151,6 +140,16 @@
             <artifactId>allure-testng</artifactId>
             <artifactId>allure-testng</artifactId>
             <version>${allure.version}</version>
             <version>${allure.version}</version>
         </dependency>
         </dependency>
+        <dependency>
+            <groupId>io.qase</groupId>
+            <artifactId>qase-testng</artifactId>
+            <version>${qase.io.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>io.qase</groupId>
+            <artifactId>qase-api</artifactId>
+            <version>${qase.io.version}</version>
+        </dependency>
         <dependency>
         <dependency>
             <groupId>org.hamcrest</groupId>
             <groupId>org.hamcrest</groupId>
             <artifactId>hamcrest</artifactId>
             <artifactId>hamcrest</artifactId>
@@ -186,11 +185,6 @@
             <artifactId>kafka-ui-contract</artifactId>
             <artifactId>kafka-ui-contract</artifactId>
             <version>${kafka-ui-contract}</version>
             <version>${kafka-ui-contract}</version>
         </dependency>
         </dependency>
-        <dependency>
-            <groupId>io.qase</groupId>
-            <artifactId>qase-api</artifactId>
-            <version>${qase.io.version}</version>
-        </dependency>
     </dependencies>
     </dependencies>
 
 
     <profiles>
     <profiles>

+ 11 - 10
kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/settings/BaseSource.java

@@ -5,16 +5,17 @@ import org.aeonbits.owner.ConfigFactory;
 
 
 public abstract class BaseSource {
 public abstract class BaseSource {
 
 
-  private static Config config;
-  public static final String BASE_CONTAINER_URL = "http://host.testcontainers.internal:8080";
-  public static final String BASE_LOCAL_URL = "http://localhost:8080";
-  public static final String CLUSTER_NAME = "local";
-  public static final String BROWSER = config().browser();
+    public static final String BASE_CONTAINER_URL = "http://host.testcontainers.internal:8080";
+    public static final String BASE_LOCAL_URL = "http://localhost:8080";
+    public static final String CLUSTER_NAME = "local";
+    private static Config config;
+    public static final String BROWSER = config().browser();
+    public static final String SUITE = config().suite();
 
 
-  private static Config config() {
-    if (config == null) {
-      config = ConfigFactory.create(Config.class, System.getProperties());
+    private static Config config() {
+        if (config == null) {
+            config = ConfigFactory.create(Config.class, System.getProperties());
+        }
+        return config;
     }
     }
-    return config;
-  }
 }
 }

+ 9 - 5
kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/settings/configs/Profiles.java

@@ -4,10 +4,14 @@ import org.aeonbits.owner.Config;
 
 
 public interface Profiles extends Config {
 public interface Profiles extends Config {
 
 
-  String CONTAINER = "container";
-  String LOCAL = "local";
+    String CONTAINER = "container";
+    String LOCAL = "local";
 
 
-  @Key("browser")
-  @DefaultValue(CONTAINER)
-  String browser();
+    @Key("browser")
+    @DefaultValue(CONTAINER)
+    String browser();
+
+    @Key("suite")
+    @DefaultValue("smoke")
+    String suite();
 }
 }

+ 0 - 145
kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/utilities/qaseIoUtils/QaseExtension.java

@@ -1,145 +0,0 @@
-package com.provectus.kafka.ui.utilities.qaseIoUtils;
-
-import io.qase.api.QaseClient;
-import io.qase.api.StepStorage;
-import io.qase.api.exceptions.QaseException;
-import io.qase.client.ApiClient;
-import io.qase.client.api.ResultsApi;
-import io.qase.client.model.ResultCreate;
-import io.qase.client.model.ResultCreate.StatusEnum;
-import io.qase.client.model.ResultCreateSteps;
-import lombok.extern.slf4j.Slf4j;
-import org.junit.platform.engine.TestExecutionResult;
-import org.junit.platform.engine.TestSource;
-import org.junit.platform.engine.support.descriptor.MethodSource;
-import org.junit.platform.launcher.TestExecutionListener;
-import org.junit.platform.launcher.TestIdentifier;
-
-import javax.annotation.Nullable;
-import java.lang.reflect.Method;
-import java.text.SimpleDateFormat;
-import java.time.Duration;
-import java.util.*;
-import java.util.concurrent.ConcurrentHashMap;
-
-import static io.qase.api.QaseClient.getConfig;
-import static io.qase.api.utils.IntegrationUtils.getCaseId;
-import static io.qase.api.utils.IntegrationUtils.getStacktrace;
-import static org.apache.commons.lang3.StringUtils.isEmpty;
-import static org.junit.platform.engine.TestExecutionResult.Status.SUCCESSFUL;
-
-@Slf4j
-public class QaseExtension implements TestExecutionListener {
-
-    private static final String QASE_PROJECT = "KAFKAUI";
-
-    static {
-        String qaseApiToken = System.getProperty("QASEIO_API_TOKEN");
-        if (isEmpty(qaseApiToken)) {
-            log.warn("QASEIO_API_TOKEN system property is not set. Support for Qase will be disabled.");
-            System.setProperty("QASE_ENABLE", "false");
-        } else {
-            System.setProperty("QASE_ENABLE", "true");
-            System.setProperty("QASE_PROJECT_CODE", QASE_PROJECT);
-            System.setProperty("QASE_API_TOKEN", qaseApiToken);
-            System.setProperty("QASE_USE_BULK", "false");
-            if ("true".equalsIgnoreCase(System.getProperty("QASEIO_CREATE_TESTRUN"))) {
-                System.setProperty("QASE_RUN_NAME", "Automation run " +
-                        new SimpleDateFormat("dd/MM/yyyy HH:mm:ss").format(new Date()));
-            }
-        }
-    }
-
-    private final ApiClient apiClient = QaseClient.getApiClient();
-    private final ResultsApi resultsApi = new ResultsApi(apiClient);
-    private final Map<TestIdentifier, Long> testStartTimes = new ConcurrentHashMap<>();
-
-    @Override
-    public void executionStarted(TestIdentifier testIdentifier) {
-        if (QaseClient.isEnabled() && testIdentifier.isTest()) {
-            testStartTimes.put(testIdentifier, System.currentTimeMillis());
-        }
-    }
-
-    @Override
-    public void executionFinished(TestIdentifier testIdentifier, TestExecutionResult testExecutionResult) {
-        if (!testIdentifier.isTest() || !QaseClient.isEnabled()
-                || !testStartTimes.containsKey(testIdentifier)) {
-            return;
-        }
-        TestSource testSource = testIdentifier.getSource().orElse(null);
-        Method testMethod = null;
-        if (testSource instanceof MethodSource) {
-            testMethod = getMethod((MethodSource) testSource);
-        }
-        TestCaseGenerator.createTestCaseIfNotExists(testMethod);
-        Duration duration = Duration.ofMillis(System.currentTimeMillis() - this.testStartTimes.remove(testIdentifier));
-        sendResults(testExecutionResult, duration, testMethod);
-    }
-
-    private void sendResults(TestExecutionResult testExecutionResult, Duration timeSpent, Method testMethod) {
-        if (testMethod != null) {
-            ResultCreate resultCreate = getResultItem(testExecutionResult, timeSpent, testMethod);
-            try {
-                resultsApi.createResult(getConfig().projectCode(),
-                        getConfig().runId(),
-                        resultCreate);
-                log.info("Method = " + testMethod.getName() + ": Result added to test run with Id = {}", getConfig().runId());
-            } catch (QaseException e) {
-                log.error("Method = " + testMethod.getName() + ": Result not added to test Run because there is no @CaseId annotation or case not found", e);
-            }
-        }
-    }
-
-    private ResultCreate getResultItem(TestExecutionResult testExecutionResult, Duration timeSpent, Method testMethod) {
-        String testCaseTitle = TestCaseGenerator.generateTestCaseTitle(testMethod);
-        TestCaseGenerator.createTestCaseIfNotExists(testMethod);
-        Long caseId = getCaseId(testMethod);
-        Map<Long, String> cases = TestCaseGenerator.getTestCasesTitleAndId();
-        StatusEnum status = StatusEnum.SKIPPED;
-
-        if (caseId == null || !TestCaseGenerator.isCaseIdPresentInQaseIo(testMethod)) {
-            for (Map.Entry<Long, String> map : cases.entrySet()) {
-                if (map.getValue().matches(testCaseTitle)) {
-                    caseId = map.getKey();
-                    log.info("There is no annotation @CaseId but there is test case with title '" + testCaseTitle + "' and with id = " + caseId
-                            + " that will be added to test Run");
-                }
-            }
-        }
-
-        if (TestCaseGenerator.getAutomationStatus(testMethod) == 2) {
-            status = testExecutionResult.getStatus() == SUCCESSFUL ? StatusEnum.PASSED : StatusEnum.FAILED;
-        }
-
-        String comment = testExecutionResult.getThrowable()
-                .flatMap(throwable -> Optional.of(throwable.toString())).orElse(null);
-        Boolean isDefect = testExecutionResult.getThrowable()
-                .flatMap(throwable -> Optional.of(throwable instanceof AssertionError))
-                .orElse(false);
-        String stacktrace = testExecutionResult.getThrowable()
-                .flatMap(throwable -> Optional.of(getStacktrace(throwable))).orElse(null);
-        LinkedList<ResultCreateSteps> steps = StepStorage.getSteps();
-        return new ResultCreate()
-                .caseId(caseId)
-                .status(status)
-                .timeMs(timeSpent.toMillis())
-                .comment(comment)
-                .stacktrace(stacktrace)
-                .steps(steps.isEmpty() ? null : steps)
-                .defect(isDefect);
-    }
-
-    @Nullable
-    private Method getMethod(MethodSource testSource) {
-        try {
-            Class<?> testClass = Class.forName(testSource.getClassName());
-            return Arrays.stream(testClass.getDeclaredMethods())
-                    .filter(method -> MethodSource.from(method).equals(testSource))
-                    .findFirst().orElse(null);
-        } catch (ClassNotFoundException e) {
-            log.error(e.getMessage());
-            return null;
-        }
-    }
-}

+ 28 - 0
kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/utilities/qaseIoUtils/QaseUtils.java

@@ -0,0 +1,28 @@
+package com.provectus.kafka.ui.utilities.qaseIoUtils;
+
+import lombok.extern.slf4j.Slf4j;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import static com.provectus.kafka.ui.settings.BaseSource.SUITE;
+
+@Slf4j
+public class QaseUtils {
+
+    public static void setupQaseExtension() {
+        String qaseApiToken = System.getProperty("QASEIO_API_TOKEN");
+        if (qaseApiToken.isEmpty()) {
+            log.warn("QASEIO_API_TOKEN system property wasn't set. Support for Qase will be disabled.");
+            System.setProperty("QASE_ENABLE", "false");
+        } else {
+            log.warn("QASEIO_API_TOKEN was set. Find this run at https://app.qase.io/run/KAFKAUI.");
+            System.setProperty("QASE_ENABLE", "true");
+            System.setProperty("QASE_PROJECT_CODE", "KAFKAUI");
+            System.setProperty("QASE_API_TOKEN", qaseApiToken);
+            System.setProperty("QASE_USE_BULK", "false");
+            System.setProperty("QASE_RUN_NAME", "Automation " + SUITE.toUpperCase() + ": " +
+                    new SimpleDateFormat("dd.MM.yyyy HH:mm").format(new Date()));
+        }
+    }
+}

+ 0 - 173
kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/utilities/qaseIoUtils/TestCaseGenerator.java

@@ -1,173 +0,0 @@
-package com.provectus.kafka.ui.utilities.qaseIoUtils;
-
-import com.provectus.kafka.ui.utilities.qaseIoUtils.annotations.AutomationStatus;
-import com.provectus.kafka.ui.utilities.qaseIoUtils.annotations.Suite;
-import com.provectus.kafka.ui.utilities.qaseIoUtils.enums.Status;
-import io.qase.api.QaseClient;
-import io.qase.api.annotation.CaseId;
-import io.qase.client.ApiClient;
-import io.qase.client.api.CasesApi;
-import io.qase.client.model.*;
-import lombok.SneakyThrows;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.lang3.ArrayUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.junit.Assert;
-import org.junit.platform.engine.support.descriptor.MethodSource;
-
-import java.lang.reflect.Method;
-import java.util.*;
-
-import static io.qase.api.QaseClient.getConfig;
-
-@Slf4j
-public class TestCaseGenerator {
-
-    private static final ApiClient apiClient = QaseClient.getApiClient();
-    private static final CasesApi casesApi = new CasesApi(apiClient);
-    public static boolean FAILED = false;
-
-    @SneakyThrows
-    public static void createTestCaseIfNotExists(Method testMethod) {
-        TestCaseCreate caseCreate = new TestCaseCreate();
-        String testCaseTitle = generateTestCaseTitle(testMethod);
-        if (!isMethodAnnotatedWithCaseId(testMethod) || !TestCaseGenerator.isCaseIdPresentInQaseIo(testMethod)) {
-            if (!isCaseTitleExistInQaseIo(testMethod)) {
-                caseCreate.setTitle(testCaseTitle);
-                caseCreate.setAutomation(getAutomationStatus(testMethod));
-                if (isMethodAnnotatedWithSuite(testMethod)) {
-                    long suiteId = testMethod.getAnnotation(Suite.class).suiteId();
-                    caseCreate.suiteId(suiteId);
-                }
-                Long caseId = Objects.requireNonNull(casesApi.createCase(getConfig().projectCode(), caseCreate).getResult()).getId();
-                log.info("New test case = '" + testCaseTitle + "' created with id " + caseId);
-            }
-        }
-    }
-
-    @SneakyThrows
-    public static HashMap<Long, String> getTestCasesTitleAndId() {
-        HashMap<Long, String> map = new HashMap<>();
-        boolean getCases = true;
-        int offSet = 0;
-        while (getCases) {
-            getCases = false;
-            TestCaseListResponse response =
-                    casesApi.getCases(getConfig().projectCode(), new Filters().status(Filters.SERIALIZED_NAME_STATUS), 100, offSet);
-            TestCaseListResponseAllOfResult result = response.getResult();
-            Assert.assertNotNull(result);
-            List<TestCase> entities = result.getEntities();
-            Assert.assertNotNull(entities);
-            if (entities.size() > 0) {
-                for (TestCase test : entities) {
-                    map.put(test.getId(), test.getTitle());
-                }
-                offSet = offSet + 100;
-                getCases = true;
-            }
-        }
-        return map;
-    }
-
-    public static boolean isCaseIdPresentInQaseIo(Method testMethod) {
-        if (!testMethod.isAnnotationPresent(CaseId.class)) {
-            return false;
-        }
-        long caseId = testMethod.getAnnotation(CaseId.class).value();
-        HashMap<Long, String> cases = getTestCasesTitleAndId();
-        String title;
-        if (!cases.containsKey(caseId)) {
-            FAILED = true;
-            log.error("The method " + testMethod.getName() + " has wrong @CaseId =" + caseId + " that does not exist in Qase.io. " +
-                    "Please put correct @CaseId");
-            return false;
-        } else {
-            for (Map.Entry<Long, String> map : cases.entrySet()) {
-                if (map.getKey().equals(caseId)) {
-                    title = map.getValue();
-                    if (!title.matches(generateTestCaseTitle(testMethod))) {
-                        log.error("This CaseId =" + caseId + " belong to test with title = " + title);
-                        return false;
-                    }
-                }
-            }
-        }
-        return true;
-    }
-
-    private static boolean isCaseTitleExistInQaseIo(Method testMethod) {
-        HashMap<Long, String> cases = getTestCasesTitleAndId();
-        String title = generateTestCaseTitle(testMethod);
-        if (cases.containsValue(title)) {
-            for (Map.Entry<Long, String> map : cases.entrySet()) {
-                if (map.getValue().matches(title)) {
-                    long caseId = map.getKey();
-                    log.info("Test case with title '" + title + "' and id " + caseId + " exist in Qase.io. Verify that annotation @CaseId is correct");
-                    return true;
-                }
-            }
-        }
-        return false;
-    }
-
-    public static int getAutomationStatus(Method testMethod) {
-        if (testMethod.isAnnotationPresent(AutomationStatus.class)) {
-            if (testMethod.getAnnotation(AutomationStatus.class).status().equals(Status.TO_BE_AUTOMATED))
-                return 1;
-            else if (testMethod.getAnnotation(AutomationStatus.class).status().equals(Status.MANUAL))
-                return 0;
-        }
-        return 2;
-    }
-
-    private static boolean isMethodAnnotatedWithCaseId(Method testMethod) {
-        if (!testMethod.isAnnotationPresent(CaseId.class)) {
-            FAILED = true;
-            log.error("You must put annotation @CaseId. The method " + testMethod.getName() + " is NOT annotated with @CaseId.");
-            return false;
-        }
-        return true;
-    }
-
-    private static boolean isMethodAnnotatedWithSuite(Method testMethod) {
-        if (!testMethod.isAnnotationPresent(Suite.class)) {
-            log.info("The method " + testMethod.getName() + " is not annotated with @Suite and new test case will be added without suite");
-            return false;
-        }
-        log.trace("The method is annotated with @Suite with id " + testMethod.getAnnotation(Suite.class).suiteId());
-        return true;
-    }
-
-    private static boolean isMethodAnnotatedWithAutomationStatus(Method testMethod) {
-        if (!testMethod.isAnnotationPresent(AutomationStatus.class)) {
-            log.error("The method " + testMethod.getName() + " is NOT annotated with @AutomationStatus.");
-            return false;
-        }
-        return true;
-    }
-
-    private static String formatTestCaseTitle(String testMethodName) {
-        String[] split = StringUtils.splitByCharacterTypeCamelCase(testMethodName);
-        String[] name = Arrays.stream(split).map(String::toLowerCase).toArray(String[]::new);
-        String[] subarray = ArrayUtils.subarray(name, 1, name.length);
-        ArrayList<String> stringList = new ArrayList<>(Arrays.asList(subarray));
-        stringList.add(0, StringUtils.capitalize(name[0]));
-        return StringUtils.join(stringList, " ");
-    }
-
-    public static String generateTestCaseTitle(Method testMethod) {
-        return getClassName(MethodSource.from(testMethod)) + "." + testMethod.getName() + " : " +
-                formatTestCaseTitle(testMethod.getName());
-    }
-
-    private static String getClassName(MethodSource testSource) {
-        Class<?> testClass;
-        try {
-            testClass = Class.forName(testSource.getClassName());
-        } catch (ClassNotFoundException e) {
-            log.error(e.getMessage());
-            return null;
-        }
-        return testClass.getSimpleName();
-    }
-}

+ 1 - 1
kafka-ui-e2e-checks/src/main/java/com/provectus/kafka/ui/utilities/qaseIoUtils/enums/Status.java

@@ -1,5 +1,5 @@
 package com.provectus.kafka.ui.utilities.qaseIoUtils.enums;
 package com.provectus.kafka.ui.utilities.qaseIoUtils.enums;
 
 
 public enum Status {
 public enum Status {
-    AUTOMATED, TO_BE_AUTOMATED, MANUAL;
+    AUTOMATED, TO_BE_AUTOMATED, MANUAL
 }
 }

+ 0 - 1
kafka-ui-e2e-checks/src/main/resources/META-INF/services/org.junit.platform.launcher.TestExecutionListener

@@ -1 +0,0 @@
-com.provectus.kafka.ui.utilities.qaseIoUtils.QaseExtension

+ 5 - 2
kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/BaseTest.java

@@ -6,7 +6,8 @@ import com.codeborne.selenide.SelenideElement;
 import com.codeborne.selenide.WebDriverRunner;
 import com.codeborne.selenide.WebDriverRunner;
 import com.provectus.kafka.ui.settings.listeners.AllureListener;
 import com.provectus.kafka.ui.settings.listeners.AllureListener;
 import com.provectus.kafka.ui.settings.listeners.LoggerListener;
 import com.provectus.kafka.ui.settings.listeners.LoggerListener;
-import io.qase.api.annotation.Step;
+import io.qameta.allure.Step;
+import io.qase.testng.QaseListener;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
 import org.openqa.selenium.Dimension;
 import org.openqa.selenium.Dimension;
 import org.openqa.selenium.chrome.ChromeOptions;
 import org.openqa.selenium.chrome.ChromeOptions;
@@ -26,9 +27,10 @@ import static com.provectus.kafka.ui.settings.BaseSource.*;
 import static com.provectus.kafka.ui.settings.configs.Profiles.CONTAINER;
 import static com.provectus.kafka.ui.settings.configs.Profiles.CONTAINER;
 import static com.provectus.kafka.ui.settings.configs.Profiles.LOCAL;
 import static com.provectus.kafka.ui.settings.configs.Profiles.LOCAL;
 import static com.provectus.kafka.ui.settings.drivers.LocalWebDriver.*;
 import static com.provectus.kafka.ui.settings.drivers.LocalWebDriver.*;
+import static com.provectus.kafka.ui.utilities.qaseIoUtils.QaseUtils.setupQaseExtension;
 
 
 @Slf4j
 @Slf4j
-@Listeners({AllureListener.class, LoggerListener.class})
+@Listeners({AllureListener.class, LoggerListener.class, QaseListener.class})
 public abstract class BaseTest extends Facade {
 public abstract class BaseTest extends Facade {
 
 
     private static final String SELENIUM_IMAGE_NAME = "selenium/standalone-chrome:103.0";
     private static final String SELENIUM_IMAGE_NAME = "selenium/standalone-chrome:103.0";
@@ -41,6 +43,7 @@ public abstract class BaseTest extends Facade {
 
 
     @BeforeSuite(alwaysRun = true)
     @BeforeSuite(alwaysRun = true)
     public void beforeSuite() {
     public void beforeSuite() {
+        setupQaseExtension();
         switch (BROWSER) {
         switch (BROWSER) {
             case (CONTAINER) -> {
             case (CONTAINER) -> {
                 DockerImageName image = isARM64()
                 DockerImageName image = isARM64()

+ 1 - 1
kafka-ui-e2e-checks/src/test/java/com/provectus/kafka/ui/smokeSuite/topics/MessagesTest.java

@@ -7,8 +7,8 @@ import com.provectus.kafka.ui.utilities.qaseIoUtils.annotations.AutomationStatus
 import com.provectus.kafka.ui.utilities.qaseIoUtils.annotations.Suite;
 import com.provectus.kafka.ui.utilities.qaseIoUtils.annotations.Suite;
 import com.provectus.kafka.ui.utilities.qaseIoUtils.enums.Status;
 import com.provectus.kafka.ui.utilities.qaseIoUtils.enums.Status;
 import io.qameta.allure.Issue;
 import io.qameta.allure.Issue;
+import io.qameta.allure.Step;
 import io.qase.api.annotation.CaseId;
 import io.qase.api.annotation.CaseId;
-import io.qase.api.annotation.Step;
 import org.testng.Assert;
 import org.testng.Assert;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.BeforeClass;