jeudi 21 janvier 2016

No tests found when filtering junit test suite

I want to run a single junit4 test suite and specified it using filter in build.gradle ,but gradle(version 2.10) find no tests. Is there a way to run a specified junit test suite in gradle?

My test suite class


    @RunWith(Suite.class)
    @SuiteClasses({ TestFoo.class, TestBar.class })
    public class MyTestSuite {

    }

build.gradle


    test {
        filter {
            includeTestsMatching "*MyTestSuite"
        }
    }

Aucun commentaire:

Enregistrer un commentaire