I'm using gradle to build my android project and am not able to run single unit test. I have several test classes and one of them is MockServerTest and I only want to run test methods in this class.
I tried using gradle -Dtest.single=MockServerTest test but it turned out running all my tests, including these in other test classes.
I also tried gradle test --tests MockServerTest but an error occured said "Unknown option --test".
I'm using gradle 2.4 with com.android.tools.build:gradle:1.2.3. Also, how can I run a single test method inside a single test class?
BTW, I'm able to run single test method inside AndroidStudio, by right clicking on the test method and select run targetTestMethod() from the menu. But how can I achieve this in the terminal? I guess AndroidStudio also trigger a certain command to do this. How can I see what that command is?
Aucun commentaire:
Enregistrer un commentaire