Skip to content

JMockit 配置运行环境

build.gradle 配置示例:

groovy
dependencies {
    testCompile "org.jmockit:jmockit:1.46"
    testImplementation 'junit:junit:4.13.2'
}

test {
    jvmArgs "-javaagent:${classpath.find { it.name.contains("jmockit") }.absolutePath}"

    testLogging {
        outputs.upToDateWhen {false}
        showStandardStreams = true
    }
}