Пример #1
0
def T_10_oled_M(product):
    u'''OLED屏幕测试-自动判断OLED屏幕是否全黑'''
    sc = board_digital.__askForPlateDeviceCom()
    sc.asynSend("TestOLED")
    mcr = manulCheck(u"OLED测试", u"请确认OLED屏幕显示全黑。")
    sc.asynReceiveAndAssert("TestOLEDOK")
    if not mcr:
        raise TestItemFailException(failWeight=10, message=u'OLED屏幕测试人工判断不通过!')
Пример #2
0
def T_09_beep_M(product):
    u'''蜂鸣器检测-自动判定蜂鸣器是否响起'''
    sc = board_digital.__askForPlateDeviceCom()
    sc.asynSend("TestBeepPara 1000")
    mcr = manulCheck(u"声光指示测试", u"请确认蜂鸣器响声正常。")
    sc.asynReceiveAndAssert("TestBeepParaOK")
    if not mcr:
        raise TestItemFailException(failWeight=10, message=u'蜂鸣器测试人工判断不通过!')
Пример #3
0
def T_08_greenLight_M(product):
    u'''绿色LED灯检测-自动判定绿LED灯是否正常亮起'''
    sc = board_digital.__askForPlateDeviceCom()
    sc.asynSend("TestGreenLedPara 1000")
    mcr = manulCheck(u"声光指示测试", u"请确认绿色指示灯显示是否正常。")
    sc.asynReceiveAndAssert("TestGreenLedParaOK")
    if not mcr:
        raise TestItemFailException(failWeight=10, message=u'绿色指示灯测试人工判断不通过!')
Пример #4
0
def T_03_capacityVoltage_A(product):
    u'''电容电路电压测试-根据电容电路电压值判断是否满足要求'''
    sc = board_digital.__askForPlateDeviceCom()
    r = sc.assertAndGetNumberParam(request='TestCapPower',
                                   response="TestCapPower")
    result = {"电容电路电压": r}
    if r < SP('gs11.capPower.overall.low', 3300) or r > SP(
            'gs11.capPower.overall.high', 3800):
        raise TestItemFailException(failWeight=10,
                                    message=u'电容电压异常',
                                    output=result)
    return result
Пример #5
0
def T_05_batteryVoltage_A(product):
    u'''电池电路电压测试-判断电池电路电压是否满足要求'''
    sc = board_digital.__askForPlateDeviceCom()
    r = sc.assertAndGetNumberParam(request='TestBattPower',
                                   response="TestBattPower")
    result = {"电池电路电压": r}
    if r < SP('gs10.batteryPower.overall.low', 3300) or r > SP(
            'gs10.batteryPower.overall.high', 4000):
        raise TestItemFailException(failWeight=10,
                                    message=u'电池电路电压异常',
                                    output=result)
    return result
Пример #6
0
def __switchToNormalSerial():
    board_digital.__askForPlateDeviceCom().bslDevice.serial.setRTS(False)
    uiLog(u"切换至普通串口模式")
    time.sleep(1)
Пример #7
0
def __switchToNulink():
    board_digital.__askForPlateDeviceCom().bslDevice.serial.setRTS(True)
    uiLog(u"切换至NuLink模式")
    time.sleep(1)