:computer: :open_file_folder: :bar_chart: Настройка Allure, интегрированного с Selenide. Настройка ReportPortal.
plugins{
id'java'id'io.qameta.allure'version'2.8.1'
}
...
allure{
autoconfigure=true
version='2.13.0'//LatestAllureVersion
useJUnit5{version='2.13.0'//LatestAllureVersion
}
}
repositories{
jcenter()
mavenCentral()
}
Для запуска использовать команду
gradlew clean test allureReport
gradlew allureServe
plugins {
id 'java'
id "io.freefair.lombok" version "5.3.0"
}
group 'ru.netology'
version '1.0-SNAPSHOT'
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url "http://dl.bintray.com/epam/reportportal" }
}
allure{
autoconfigure=true
version='2.13.8'
useJUnit5{
version='2.13.8'
}
}
sourceCompatibility = 1.8
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.6.1'
testImplementation 'com.github.javafaker:javafaker:1.0.2'
testImplementation 'com.codeborne:selenide:5.16.2'
testRuntimeOnly 'org.slf4j:slf4j-simple:1.7.30'
implementation 'com.epam.reportportal:agent-java-junit5:5.0.0'
implementation 'com.epam.reportportal:logger-java-logback:5.0.2'
implementation 'ch.qos.logback:logback-classic:1.2.3'
implementation 'com.epam.reportportal:logger-java-log4j:5.0.2'
compileOnly 'log4j:log4j:1.2.17'
implementation 'org.apache.logging.log4j:log4j-api:2.13.3'
implementation 'org.apache.logging.log4j:log4j-core:2.13.3'
}
test {
testLogging.showStandardStreams = true
useJUnitPlatform()
systemProperty 'selenide.headless', System.getProperty('selenide.headless')
systemProperty 'selenide.browser', 'chrome'
systemProperty 'junit.jupiter.extensions.autodetection.enabled', true
}
(В данном файле также интегрирован selenide)
volumes:
# For windows host
- postgres:/var/lib/postgresql/data
# For unix host
# - ./data/postgres:/var/lib/postgresql/data
# Docker volume for Windows host
volumes:
postgres:
com.epam.reportportal.junit5.ReportPortalExtension
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<Console name="ConsoleAppender" target="SYSTEM_OUT">
<PatternLayout
pattern="%d [%t] %-5level %logger{36} - %msg%n%throwable"/>
</Console>
<ReportPortalLog4j2Appender name="ReportPortalAppender">
<PatternLayout
pattern="%d [%t] %-5level %logger{36} - %msg%n%throwable"/>
</ReportPortalLog4j2Appender>
</Appenders>
<Loggers>
<Root level="DEBUG">
<AppenderRef ref="ConsoleAppender"/>
<AppenderRef ref="ReportPortalAppender"/>
</Root>
</Loggers>
</Configuration>
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!-- Send debug messages to System.out -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- By default, encoders are assigned the type ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
<encoder>
<pattern>%d{HH:mm:ss.SSS} %-5level %logger{5} - %thread - %msg%n</pattern>
</encoder>
</appender>
<appender name="RP" class="com.epam.reportportal.logback.appender.ReportPortalAppender">
<encoder>
<!--Best practice: don't put time and logging level to the final message. Appender do this for you-->
<pattern>%d{HH:mm:ss.SSS} [%t] %-5level - %msg%n</pattern>
<pattern>[%t] - %msg%n</pattern>
</encoder>
</appender>
<!--'additivity' flag is important! Without it logback will double-log log messages-->
<logger name="binary_data_logger" level="TRACE" additivity="false">
<appender-ref ref="RP"/>
</logger>
<logger name="com.epam.reportportal.service" level="WARN"/>
<logger name="com.epam.reportportal.utils" level="WARN"/>
<!-- By default, the level of the root level is set to DEBUG -->
<root level="TRACE">
<appender-ref ref="RP"/>
<appender-ref ref="STDOUT"/>
</root>
</configuration>
docker-compose -p reportportal up -d --force-recreate
Логин superadmin
Пароль erebus
Administrative -> My Test Project -> Members -> Add user
junit.jupiter.extensions.autodetection.enabled=true
Для запуска проекта:
git clone https://github.com/IrinaVasilenko88/Allure-ReportPortal.git
artifacts
java -jar app-card-delivery.jar
gradlew test