在Android上使用多点触控的测试用例?

mak*_*kke 5 testing android multi-touch

android文档中的TouchUtils类具有以下功能drag():

https://developer.android.com/reference/android/test/TouchUtils.html#drag(android.test.InstrumentationTestCase,%20float,%20float,%20float,%20float,%20int)

但它们不支持多点触控手势,例如双指滑动.

看看这些MotionEvent.obtain()方法,似乎没有任何方法可以从测试用例中调用"虚拟"多点触摸事件.

有人有工作吗?

mak*_*kke 2

MotionEvent.obtainNano()显然除了使用私有函数来模拟多点触摸事件之外没有其他方法。希望这会在未来的版本中改变。