Gradle 诱惑报告的jvmArgs设置
我正在尝试使用using生成报告Gradle 诱惑报告的jvmArgs设置,gradle,automated-tests,kotlin,aspectj,allure,Gradle,Automated Tests,Kotlin,Aspectj,Allure,我正在尝试使用using生成报告 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' b
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
谢谢你的帮助 您的问题是您在本应使用
GString
的位置使用了字符串
jvmArgs '-javaagent:${configurations.agent.singleFile}'
这条线是照字面理解的。应该是的
jvmArgs "-javaagent:${configurations.agent.singleFile}"
以替换占位符。(单引号与双引号)。这是我的问题的答案吗?