CTS execution using junit categories

174 Views Asked by At

CTS execution:

How can we trigger the test suite of Junit by using annotations and categories through command line?

1

There are 1 best solutions below

0
On

You can run CTS individual test methods or the whole class using android instrumentation command.

For Example: Here in this example CTS test class with a specific method is mentioned to run, you can remove the test method from the below command to run all test methods within the class.

adb shell am instrument -w -e class android.animation.AnimatorSetEventsTest#testCancel \com.android.frameworks.coretests android.support.test.runner.AndroidJUnitRunner

For more details on running tests via instrumentation follow this link - https://source.android.com/compatibility/tests/development/instrumentation