You can use monkeyrunner with a python script: http://developer.android.com/tools/help/MonkeyDevice.html#drag
This blog post might help you with using monkeyrunner (it allows for getViewById in the mr script): http://dtmilano.blogspot.com/2012/03/monkeyrunner-running-unit-tests.html
You can use a ProcessBuilder in a JUnitTest to run monkeyrunner and test the output.
Once you have it working in a JUnitTest, you should be able to use them with CTS.