jeudi 24 septembre 2015

Unit testing under test artifacts in build variants missing in IntelliJ Idea CE 14.1.4

I have a multi-module Android gradle project which I run in IntelliJ 14.1.4. In the app module of my project, I have some unit tests. The build.gradle file of app project looks like follows:

build.gradle (app)

...

sourceSets {
    main {
        java.srcDirs = ['src']
        res.srcDirs = ['res']
        jniLibs.srcDirs = ['jniLibs']
    }
    test {
        java.srcDirs = ['tests']
    }
}

dependencies {
    ...
    testCompile 'org.powermock:powermock-mockito-release-full:1.6.2'
    testCompile 'junit:junit:4.11'
    testCompile 'org.mockito:mockito-all:1.10.19'
}

directory structure (app)

--app/
-----src/
-----res/
-----tests/
-----jniLibs/

I am using android gradle build tool version 1.2.3 (which is newer than 1.1.0 as suggested by IntelliJ to enable unit testing).

Even with these settings I am unable to get the unit testing under test artifacts in build variants window. What is wrong?

Aucun commentaire:

Enregistrer un commentaire