As a first step, you can change the name of the test method to match the standard convention used in JUnit 3 t public void testWhatever() { ... } first 4 letters of the name NITU are "test" in lower case, the signature is public void and the method is not accepts no parameters.
Similarly, you can change the package name to a more standard subordinate convention, for example. org.example.tests If the file is called Tests.java (and a class, also called Tests), then you should be able to call it like this:
adb shell uiautomator runtest Tests.jar -c com.example.tests.Tests
If this does not help, can you reconsider the question to include all the code from your Tests.java file?
Note. I did not try to reproduce the code at this stage when I travel. I can do this if my suggestions do not unblock your problems.
I will follow uiautomator: permission denied separately. UI Automator tests run on real devices. They do not need the device to be implemented. I run them on standard Android 4.2.x devices.
source share