How to run a testsuite with gradlew


I have written a testsuite to test an android application but I don’t succeed to run my testsuite with gradlew I can only run all my Junit test with the command line: ./gradlew connectAndroidTest --info

What command line with .gradlew should I run to only have my test suite running . My testsuite works with android studio. I have a 2.2.1 gradle version

here is my test suite:


import junit.framework.TestSuite;


  • Created 9/11/15.
    public class MySuiteTest extends TestSuite {
    public static TestSuite suite(){

    final TestSuite t = new TestSuite();
    t.addTest(TestSuite.createTest(DtvscanTest.class, “test_001_Dtvscan”));
    t.addTest(TestSuite.createTest(ZappingTest.class, “test_002_Zapping”));

         return t;



I am also facing this problem and would like an answer.

A colleague of mine has found the solution, the command is for my example:
./gradlew cC

upgrade to gradle2.7 is mandatory

Thanks to him