Allure在本地机器上生成空的报告页面

正如标题所说,我不能强迫Allure 2在本地机器上为我生成报告。 我尝试了很多谷歌的东西,但没有任何帮助。 我使用Kotlin + Selenide + TestNG编写测试,如果它帮助某种方式:)我有点混淆testNG ,因为它有testNG版本和Gradle版本 – 哪一个应该使用? 都? 这是我的build.gradle文件:

 group 'RegisteredUserFlow' version '1.0-SNAPSHOT' buildscript { ext.kotlin_version = "1.1.2-2" repositories { jcenter() } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "ru.d10xa:gradle-allure-plugin:0.5.5" } } apply plugin: 'kotlin' apply plugin: 'java' apply plugin: 'ru.d10xa.allure' sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 allure { aspectjweaver = true testNG = true } repositories { jcenter() } configurations { agent } dependencies { agent "org.aspectj:aspectjweaver:1.8.10" compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:1.1.2-2" testCompile "com.codeborne:selenide:4.4.3" testCompile "org.testng:testng:6.10" testCompile "io.qameta.allure:allure-testng:2.0-BETA6" testCompile "io.github.bonigarcia:webdrivermanager:1.6.2" } test.doFirst { jvmArgs "-javaagent:${configurations.agent.singleFile}" } test { useTestNG(){ suites 'src/test/kotlin/testng.xml' } systemProperty 'allure.results.directory', 'build/allure-results' systemProperty 'allure.link.issue.pattern', 'https://github.com/allure-framework/allure-docs/issues/{}' systemProperty 'allure.link.tms.pattern', 'https://github.com/allure-framework/allure-docs/issues/{}' } tasks.withType(Test)*.finalizedBy allureReport 

我使用的命令是: allure serve build/allure-resultsgradlew clean test allureReport

另外,我需要Java插件吗?

感谢任何帮助! 谢谢!

PS这是我在控制台后,在gradlew clean test allureReport命令后得到的错误:

 Execution failed for task ':allureReport'. > Could not resolve all dependencies for configuration ':allureReport'. > Could not resolve org.slf4j:slf4j-api:1.7.12. Required by: project : > ru.yandex.qatools.allure:allure-bundle:1.4.24.RC3 > org.slf4j:slf4j-simple:1.7.12 project : > ru.yandex.qatools.allure:allure-bundle:1.4.24.RC3 > ru.yandex.qatools.allure:allure-report-data:1.4.24.RC3 > ru.yandex.qatools.allure:allure-report-plugin-api:1.4.24.RC3 > ru.yandex.qatools.allure:allure-model:1.4.24.RC3 

问题是ru.d10xa:gradle-allure-plugin:0.5.5不支持Allure 2.我们正在研究全新的Allure Gradle插件,可以在这里https://github.com/allure-framework/allure-gradle

目前,您可以使用allure-commandline在本地机器上生成报告,使用Allure Jenkins / Teamcity插件生成CI报告。

更新

支持Allure 2的New Allure Gradle插件现在可用。 有关更多详细信息,请参阅文档https://docs.qameta.io/allure/2.0/#_gradle_3