我正在使用下面的代码在 AVD(Android 模拟器)上使用 monkeyrunner 按顺序执行脚本测试,我想知道是否可以在所有模拟器上并行执行脚本测试。
*listADVtotest是一个文本文件,其中包含在线模拟器的名称,对于每个模拟器,我都会调用 monkeyrunner 来执行测试。
for index, line in enumerate(listAVDtotest):
emulatorid = listdevtotest[index][0]
deviceid = listdevtotest[index][1]
print "Identified device %s" % deviceid
#Execute test with monkeyrunner for each AVD
subprocess.call('monkeyrunner -v ALL Test1.py ' + emulatorid + ' ' + deviceid + ' ' + str(index), shell=True)