java使用allure_使用Allure2 Junit5 Gradle Selenide时Allure报告为空

我的build.gradle是:

apply plugin: 'java'

apply plugin: 'idea'

apply plugin: 'org.junit.platform.gradle.plugin'

apply plugin: 'io.qameta.allure'

defaultTasks 'clean', 'test'

ext.junitJupiterVersion = '5.0.0-M4'

ext.selenideVersion = '4.4.3'

compileTestJava {

sourceCompatibility = 1.8

targetCompatibility = 1.8

options.encoding = 'UTF-8'

options.compilerArgs += "-parameters"

}

compileJava.options.encoding = 'UTF-8'

tasks.withType(JavaCompile) {

options.encoding = 'UTF-8'

}

repositories {

jcenter()

mavenCentral()

}

buildscript {

repositories {

jcenter()

mavenCentral()

}

dependencies {

classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0-M4'

classpath 'io.qameta.allure:allure-gradle:2.3'

}

}

allure {

aspectjweaver = true

autoconfigure = true

version = '2.1.1'

}

configurations {

agent

}

dependencies {

// JUnit5

compile("org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}")

compile("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}")

// Selenide

compile("com.codeborne:selenide:${selenideVersion}") {

exclude group: 'junit'

}

// Allure

agent 'org.aspectj:aspectjweaver:1.8.10'

compile 'ru.yandex.qatools.allure:allure-junit-adaptor:1.4.23'

compile 'io.qameta.allure:allure-junit5:2.0-BETA6'

}

junitPlatform {

platformVersion = "1.0.0-M5"

enableStandardTestTask = true

}

task runJupiter(type: JavaExec) {

jvmArgs '-ea'

jvmArgs "-javaagent:${configurations.agent.singleFile}"

classpath = project.sourceSets.test.runtimeClasspath

main 'org.junit.platform.console.ConsoleLauncher'

args '--scan-class-path'

args "--reports-dir=${buildDir}/allure-results"

finalizedBy 'allureReport'

}

test.dependsOn runJupiter

测试成功完成,并自动创建三个文件夹:

\ allure-results with .json file\ build \ test-results \ _unit-platform with TEST-junit-jupiter.xml file \ build \ reports \ allure-report

我尝试通过诱惑命令行(CLI)在本地打开.json和.xml结果 . 诱惑报告已打开,但它是空白的:this is a report view

我想我在gradle依赖项中的错误 . 我很困惑哪些库和版本应该用于JUnit5 Allure2 Gradle Selenide Java8?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值