【发布时间】:2023-03-30 09:52:01
【问题描述】:
我正在尝试通过使用生成报告
gradlew clean test
命令。它失败并出现错误:
Error occured during intialization of VM
Error opening zip file or JAR nanifest missing : ${configurations.agent.singleFile}
这是我的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"
}
}
apply plugin: 'kotlin'
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/resources/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/{}'
}
我一直认为问题出在aspectJ,但我不确定。
我错过了 gradle 文件中的某些内容吗?或者它在我的测试文件中的某个地方?或者最新的Allure 版本可能有问题?我看到jvmArgs 以灰色突出显示(从未使用过) - 也许有问题?
对于我从未与Allure 和aspectJ 处理过的许多问题,我深表歉意。
感谢您的帮助!
【问题讨论】:
-
这是answer 我的问题吗?
标签: gradle automated-tests kotlin aspectj allure