简体   繁体   中英

How to run single test method in android instrumented test class and how to change edit configuration for this

I have written multiple test methods in a single android instrumented test class, when I am trying to run a single test method it will run all methods exists in that class. I want to run only one.

Earlier I was able to run all, but somehow configuration settings have been changed

class HistoryTest{

@Test
fun openHistoryTest{
}

@Test
fun closeHistoryTest{
}

@Test
fun editHistoryTest{
}
}

I want to run a specific single test method say openHistoryTest. Currently getting an error - the command line is too long shorten the command line for test "testname"

I updated Android Studio to canary and can run the whole class or a single method as instrumental test. Currently using AS 3.6 Canary 12.

Still doesn't work on Android Studio 3.5. I can't run each method as an instrumental test, only the whole class.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM