【问题标题】:Could not find method suites() for arguments [src/test/resources/testSuite.xml] on project在项目中找不到参数 [src/test/resources/testSuite.xml] 的方法套件()
【发布时间】:2016-11-21 09:34:42
【问题描述】:

我在 gradle 中创建了一个带有 testng 框架的项目,如何使用 gradle 在 testng 中执行测试套件,请帮助这里是我的 build.gradle

build.gradle   

apply plugin: 'java'
apply plugin: 'eclipse'

sourceCompatibility = 1.8
version = '1.0'
jar {
    manifest {
        attributes 'Implementation-Title': 'Gradle Quickstart',
                   'Implementation-Version': version
    }
}

repositories {
    mavenCentral()
}

dependencies {
    compile group: 'commons-collections', name: 'commons-collections', version: '3.2'
    testCompile group: 'junit', name: 'junit', version: '4.+'
}

test {
    systemProperties 'property': 'value'
}

【问题讨论】:

    标签: java gradle testng


    【解决方案1】:
    test {
        useTestNG() {
            suites 'src/test/resources/testng.xml'
        }
    }
    

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-03-22
    • 2018-05-13
    • 2013-05-11
    • 2011-02-24
    • 2013-10-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多