def starttest(testfilepath): msglogger.logMessage(logger.DEBUG, 'starttest', 'start') #print 'Make a connection' #MakeAConnection() #time.sleep(5) #print 'Done with connection' # print 'test NowExecuting' # testNowExecuting(testfilepath + 'nowExecuting.json') # print 'test RequestAudioFocus' # testRequestAudioFocus(testfilepath + 'requestAudioFocus.json') # print 'test setLocation' # testSetLocation(testfilepath + 'setlocation.json') # print 'test PhoneIsAvailable' # testPhoneIsAvailable(testfilepath + 'setPhoneAvailability.json') # print 'test GoToKeyboard' # testGoToKeyboard() # time.sleep(2) testTemplate1(testfilepath + 'template1A.json') print 'testTemplate1A done.' time.sleep(2) # testTemplate1( testfilepath + 'template1A2.json' ) # print 'testTemplate1A2 done.' # time.sleep (3) # testTemplate1( testfilepath + 'template1A3.json' ) # print 'testTemplate1A3 done.' # time.sleep(2) # testTemplate1( testfilepath + 'template1B.json' ) # print 'testTemplate1B done.' # time.sleep(2) # testTemplate2(testfilepath + 'template2A.json') # print 'testTemplate2A done.' # time.sleep(2) # testTemplate2(testfilepath + 'template2B.json') # print 'testTemplate2B done.' # time.sleep(2) # testTemplate3(testfilepath + 'template3A.json') # print 'testTemplate3A done.' # time.sleep(2) # testTemplate3(testfilepath + 'template3B.json') # print 'testTemplate3B done.' # time.sleep(2) # testTemplate4(testfilepath + 'template4A.json') # print 'testTemplate4A done.' # time.sleep(2) # testTemplate4(testfilepath + 'template4B.json') # print 'testTemplate4B done.' # time.sleep(2) # testTemplate5(testfilepath + 'template5.json') # print 'testTemplate5 done.' # time.sleep(2) # testTemplate6(testfilepath + 'template6.json') # print 'testTemplate6 done.' # time.sleep(2) # testTemplate7(testfilepath + 'template7.json') # print 'testTemplate7 done.' # time.sleep(2) # testTemplate8(testfilepath + 'template8A.json') # print 'testTemplate8A done.' # time.sleep(2) # testTemplate8(testfilepath + 'template8B.json') # print 'testTemplate8B done.' # time.sleep(2) # testApplicationList(testfilepath + 'applications.json') #uncomment following to run an infinite loop to test incoming messages # otherwise execution will end at the end of this script. while (True): time.sleep(1) print 'Okay we\'re done.' HupInterface.stopHupInterface() print 'call exit' exit()
def starttest(testfilepath): msglogger.logMessage(logger.DEBUG, 'starttest', 'start') #print 'Make a connection' #MakeAConnection() #time.sleep(5) #print 'Done with connection' # print 'test NowExecuting' # testNowExecuting(testfilepath + 'nowExecuting.json') # print 'test RequestAudioFocus' # testRequestAudioFocus(testfilepath + 'requestAudioFocus.json') # print 'test setLocation' # testSetLocation(testfilepath + 'setlocation.json') # print 'test PhoneIsAvailable' # testPhoneIsAvailable(testfilepath + 'setPhoneAvailability.json') # print 'test GoToKeyboard' # testGoToKeyboard() # time.sleep(2) testTemplate1( testfilepath + 'template1A.json' ) print 'testTemplate1A done.' time.sleep(2) # testTemplate1( testfilepath + 'template1A2.json' ) # print 'testTemplate1A2 done.' # time.sleep (3) # testTemplate1( testfilepath + 'template1A3.json' ) # print 'testTemplate1A3 done.' # time.sleep(2) # testTemplate1( testfilepath + 'template1B.json' ) # print 'testTemplate1B done.' # time.sleep(2) # testTemplate2(testfilepath + 'template2A.json') # print 'testTemplate2A done.' # time.sleep(2) # testTemplate2(testfilepath + 'template2B.json') # print 'testTemplate2B done.' # time.sleep(2) # testTemplate3(testfilepath + 'template3A.json') # print 'testTemplate3A done.' # time.sleep(2) # testTemplate3(testfilepath + 'template3B.json') # print 'testTemplate3B done.' # time.sleep(2) # testTemplate4(testfilepath + 'template4A.json') # print 'testTemplate4A done.' # time.sleep(2) # testTemplate4(testfilepath + 'template4B.json') # print 'testTemplate4B done.' # time.sleep(2) # testTemplate5(testfilepath + 'template5.json') # print 'testTemplate5 done.' # time.sleep(2) # testTemplate6(testfilepath + 'template6.json') # print 'testTemplate6 done.' # time.sleep(2) # testTemplate7(testfilepath + 'template7.json') # print 'testTemplate7 done.' # time.sleep(2) # testTemplate8(testfilepath + 'template8A.json') # print 'testTemplate8A done.' # time.sleep(2) # testTemplate8(testfilepath + 'template8B.json') # print 'testTemplate8B done.' # time.sleep(2) # testApplicationList(testfilepath + 'applications.json') #uncomment following to run an infinite loop to test incoming messages # otherwise execution will end at the end of this script. while (True): time.sleep(1) print 'Okay we\'re done.' HupInterface.stopHupInterface() print 'call exit' exit()
# time.sleep(2) # testTemplate8(testfilepath + 'template8A.json') # print 'testTemplate8A done.' # time.sleep(2) # testTemplate8(testfilepath + 'template8B.json') # print 'testTemplate8B done.' # time.sleep(2) # testApplicationList(testfilepath + 'applications.json') #uncomment following to run an infinite loop to test incoming messages # otherwise execution will end at the end of this script. while (True): time.sleep(1) print 'Okay we\'re done.' HupInterface.stopHupInterface() print 'call exit' exit() ''' Run tests as needed. Modify json files in testfiles to get different behaviors on tempaltes. ''' if __name__ == "__main__": HupInterface.startHupInterface() starttest('testfiles/')
# testTemplate8(testfilepath + 'template8A.json') # print 'testTemplate8A done.' # time.sleep(2) # testTemplate8(testfilepath + 'template8B.json') # print 'testTemplate8B done.' # time.sleep(2) # testApplicationList(testfilepath + 'applications.json') #uncomment following to run an infinite loop to test incoming messages # otherwise execution will end at the end of this script. while (True): time.sleep(1) print 'Okay we\'re done.' HupInterface.stopHupInterface() print 'call exit' exit() ''' Run tests as needed. Modify json files in testfiles to get different behaviors on tempaltes. ''' if __name__ == "__main__": HupInterface.startHupInterface() starttest('testfiles/')