Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cocoa/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Gradle 诱惑报告的jvmArgs设置_Gradle_Automated Tests_Kotlin_Aspectj_Allure - Fatal编程技术网

Gradle 诱惑报告的jvmArgs设置

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

我正在尝试使用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'

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}"
以替换占位符。(单引号与双引号)。

这是我的问题的答案吗?