Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ hs_err_pid*
replay_pid*

target/
# Локальный дистрибутив Allure CLI, скачиваемый allure-maven при генерации отчёта (тикет #60)
.allure/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
Expand Down
24 changes: 24 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
<project.reporting.outputEncoding>${encoding}</project.reporting.outputEncoding>
<mapstruct.version>1.6.3</mapstruct.version>
<lombok-mapstruct-binding.version>0.2.0</lombok-mapstruct-binding.version>
<allure.version>2.35.4</allure.version>
<allure-maven.version>2.17.0</allure-maven.version>
<excludedGroups>integration</excludedGroups>
</properties>

Expand Down Expand Up @@ -119,6 +121,12 @@
<version>5.23.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-junit5</artifactId>
<version>${allure.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<repositories></repositories>
Expand Down Expand Up @@ -176,6 +184,22 @@
</systemPropertyVariables>
</configuration>
</plugin>
<!-- Локальный Allure-отчёт поверх штатного прогона (тикет #60).
Адаптер allure-junit5 сам регистрируется через SPI, headless-конфигурация
surefire и excludedGroups выше не изменены. aspectjweaver осознанно НЕ
подключаем: шаги (@Step/@Attachment) вне скоупа скелета, сырые результаты
и аннотации Epic/Feature/DisplayName/Tag работают без него.
Генерация HTML только вручную, дефолтный билд не замедляет:
mvn -B test && mvn -B io.qameta.allure:allure-maven:${allure-maven.version}:report -->
<plugin>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-maven</artifactId>
<version>${allure-maven.version}</version>
<configuration>
<resultsDirectory>${project.build.directory}/allure-results</resultsDirectory>
<reportDirectory>${project.build.directory}/allure-report</reportDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import com.DesktopApplicationClientJava.services.ServiceRegistry;
import com.DesktopApplicationClientJava.session.Session;
import com.DesktopApplicationClientJava.utils.ControllerWiring;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import java.util.UUID;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
Expand All @@ -17,13 +19,19 @@
import javafx.scene.control.TableView;
import javafx.stage.Stage;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.testfx.api.FxToolkit;

/**
* Mock-backed UI flow: real pages wired to real in-memory mock services (no Mockito on services, no
* backend). Proves that MOCK_DATA mode renders actual data.
*/
@Epic("Ресурс")
@Feature("Просмотр метаданных ресурса")
@Tag("role:user")
@DisplayName("Просмотр ресурса на моках")
class MockFlowTest extends FxTestBase {
private static final UUID SEEDED_RESOURCE_ID =
UUID.fromString("aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa");
Expand Down Expand Up @@ -75,6 +83,7 @@ void mockLoginPutsUserIntoSession() {

@Test
@SuppressWarnings("unchecked")
@DisplayName("Страница показывает мок-ресурс из памяти")
void detailsPageRendersSeededMockResource() {
robot.interact(
() -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@
import static org.junit.jupiter.api.Assertions.assertNull;

import com.DesktopApplicationClientJava.validation.utils.ErrorMessages;
import io.qameta.allure.Epic;
import io.qameta.allure.Feature;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

@Epic("Проверка ввода")
@Feature("Вход (email + пароль)")
@Tag("role:none")
@DisplayName("Проверка адреса почты")
public class EmailValidatorTest {
private static final String FIELD_NAME = EmailValidator.FIELD_NAME;

Expand Down Expand Up @@ -40,6 +48,7 @@ void emailWithoutAtIsRejected() {
}

@Test
@DisplayName("Корректный адрес принимается")
void validEmailIsAccepted() {
assertNull(EmailValidator.validate("test@example.com"));
}
Expand Down
1 change: 1 addition & 0 deletions src/test/resources/allure.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
allure.results.directory=target/allure-results
Loading