def T_04_testBeep_M(product): u'''蜂鸣器测试-人工判定蜂鸣器是否响起''' global usbTestor usbTestor.setUp() usbTestor.test_Beep() mcr = manulCheck(u"蜂鸣器测试", u"请确认听到蜂鸣器的声音。") if not mcr: raise TestItemFailException(failWeight=10, message=u'蜂鸣器人工检测不通过!')
def T_06_testLightGreenLed_M(product): u"绿色LED指示灯检测-人工判定绿色指示灯是否正常亮起" global usbTestor usbTestor.setUp() usbTestor.test_LightGreenLed() usbTestor.tearDown() mcr = manulCheck(u"指示灯测试", u"请确认绿色指示灯亮起。") if not mcr: raise TestItemFailException(failWeight=10, message=u'绿色指示灯人工检测不通过!')
def T_10_miReadCardID_A(product): u"复合卡ID读取测试-读取复合卡ID测试" global usbTestor manulCheck(u"操作提示", u"请将复合卡放置在发卡器上,然后点击确定", "ok") try: usbTestor.setUp() usbTestor.test_MIreadCardId() except Exception, e: raise TestItemFailException(failWeight=10, message=u'MI卡ID读取测试失败!' + str(e))
def T_08_cpuCardTest_A(product): u"CPU卡测试-读取CPU卡测试" global usbTestor manulCheck(u"操作提示", u"请将CPU卡放置在发卡器上,然后点击确定", "ok") try: usbTestor.setUp() usbTestor.test_CpuCard() except Exception, e: raise TestItemFailException(failWeight=10, message=u'CPU卡测试失败!' + str(e))
def T_07_etcTradeWithoutPsam_A(product): u'''无PSAM卡交易测试-无PSAM卡交易测试''' global usbTestor manulCheck(u"操作提示", u"请将OBU插【华虹卡】后放置在发卡器上,待OBU绿灯闪烁后确定", "ok") try: usbTestor.setUp() usbTestor.test_EtcTradeWithoutPsam() except Exception, e: raise TestItemFailException(failWeight=10, message=u'无PSAM卡交易测试失败!' + str(e))
def T_09_m1CardTest_A(product): u"M1卡测试-读取M1卡测试" global usbTestor manulCheck(u"操作提示", u"请将M1卡放置在发卡器上,然后点击确定", "ok") global usbTestor try: usbTestor.setUp() usbTestor.test_M1Card() except Exception, e: raise TestItemFailException(failWeight=10, message=u'M1卡测试失败!' + str(e))
def setup(product): '''初始化函数''' try: usbTestor.setUp() except Exception, e: raise AbortTestException(u"初始化USB连接失败" + str(e))