api.powerOffSTB() api.powerOnSTB() else: print("No need to reboot") setStepStatus(api.TM.PASS) # ============ # STEP # ============ step_name = "Iteration: {} : Initialise KMAX network emulator".format(iteration) expected_result = "Set up network impairment as per filter" defineStep(step_name, step_name, expected_result) kmaxImpairment.switchImpairment_ON(impairment='SG', delay=6, filterNo=filterNo) api.waitSec(240) setStepStatus(api.TM.PASS) # ============ # STEP # ============ step_name = "Iteration: {} : Validate the current screen".format(iteration) expected_result = "Error code 0500 on the screen" defineStep(step_name, step_name, expected_result) if debugApk: api.writeDebugLine("Session Guard connectivity") adbLogs.printGenericLogs(t.server, t.slotNo, tag="VeopApp:D", search='connect: failed to connect') errorResult = errorCheck.getErrorCode()
else: print("No need to reboot") setStepStatus(api.TM.PASS) # ============ # STEP # ============ step_name = "Iteration: {} : Initialise KMAX network emulator".format(iteration) expected_result = "Set up network impairment as per filter" defineStep(step_name, step_name, expected_result) kmaxImpairment.switchImpairment_ON(impairment='DNS', drop=100, filterNo=filterNo) api.waitSec(270) setStepStatus(api.TM.PASS) # ============ # STEP # ============ step_name = "Iteration: {} : Validate the current screen".format(iteration) expected_result = "Error code 102 on the screen" defineStep(step_name, step_name, expected_result) print('DNS server connectivity') adbLogs.printGenericLogs(t.server, t.slotNo, tag="chromium:E", search="Connectivity check") adbLogs.printGenericLogs(t.server, t.slotNo, tag="VeopApp:E", search="www.google.com") adbLogs.printGenericLogs(t.server, t.slotNo, tag="VeopApp:E", search="Unable to resolve host")
setStepStatus(api.TM.PASS) else: setStepStatus(api.TM.FAIL) # ============ # STEP # ============ step_name = "Iteration: {} : Initialise KMAX network emulator".format( iteration) expected_result = "Set up network impairment as per filter" defineStep(step_name, step_name, expected_result) if verifySettings: nav.resetLastNavScreen() nav.navigateTo("OpenSystemSetting") api.waitSec(5) api.pressButtons(["OK", "OK", "DOWN"], 5) else: api.pressButtons(['POWER', 'POWER', '5'], 10) kmaxImpairment.switchImpairment_ON(impairment='SG', delay=6, filterNo=filterNo) setStepStatus(api.TM.PASS) # ============ # STEP # ============
setStepStatus(api.TM.PASS) # ============ # STEP # ============ step_name = "Iteration: {} : Initialise KMAX network emulator".format( iteration) expected_result = "Set up network impairment as per filter" defineStep(step_name, step_name, expected_result) kmaxImpairment.switchImpairment_ON(impairment='CSDS', delay=6, filterNo=filterNo) api.waitSec(180) setStepStatus(api.TM.PASS) # ============ # STEP # ============ step_name = "Iteration: {} : Validate the current screen".format( iteration) expected_result = "Error code 0204 on the screen" defineStep(step_name, step_name, expected_result) if debugApk: api.writeDebugLine("CSDS connectivity") adbLogs.printGenericLogs(t.server, t.slotNo,
else: print("No need to reboot") setStepStatus(api.TM.PASS) # ============ # STEP # ============ step_name = "Iteration: {}: Initialise KMAX network emulator".format(iteration) expected_result = "Set up network impairment as per filter" defineStep(step_name, step_name, expected_result) kmaxImpairment.switchImpairment_ON(impairment='Gateway', drop=100, filterNo=filterNo) api.waitSec(280) setStepStatus(api.TM.PASS) # ============ # STEP # ============ step_name = "Iteration: {} : Validate the current screen".format(iteration) expected_result = "Error code 0101 on the screen" defineStep(step_name, step_name, expected_result) errorResult = errorCheck.getErrorCode() print(errorResult) if errorResult[0]: setStepStatus(api.TM.PASS) else:
setStepStatus(api.TM.PASS) # ============ # STEP # ============ step_name = "Iteration: {} Initialise KMAX network emulator".format( iteration) expected_result = "Set up network impairment as per filter" defineStep(step_name, step_name, expected_result) kmaxImpairment.switchImpairment_ON(impairment='DNS', delay=15, filterNo=filterNo) api.waitSec(250) setStepStatus(api.TM.PASS) # ============ # STEP # ============ step_name = "Iteration: {} : Validate the current screen".format( iteration) expected_result = "Error code 0102 on the screen" defineStep(step_name, step_name, expected_result) print('DNS server connectivity') adbLogs.printGenericLogs(t.server, t.slotNo,
expected_result = "Set up network impairment as per filter" defineStep(step_name, step_name, expected_result) kmaxImpairment.switchImpairment_ON(impairment='DHCP', drop=100, filterNo=filterNo) setStepStatus(api.TM.PASS) # ============ # STEP # ============ step_name = "Iteration: {} : Power ON the DUT".format(iteration) expected_result = "DUT wakes up, it shows android animation" defineStep(step_name, step_name, expected_result) api.powerOnSTB() api.waitSec(120) setStepStatus(api.TM.PASS) # ============ # STEP # ============ step_name = "Iteration: {} : Validate the current screen".format(iteration) expected_result = "Error code 0100 on the screen" defineStep(step_name, step_name, expected_result) errorResult = errorCheck.getErrorCode() print(errorResult) if errorResult[0]: setStepStatus(api.TM.PASS)
setStepStatus(api.TM.PASS) else: setStepStatus(api.TM.FAIL) # ============ # STEP # ============ step_name = "Iteration: {} : Initialise KMAX network emulator".format( iteration) expected_result = "Set up network impairment as per filter" defineStep(step_name, step_name, expected_result) kmaxImpairment.switchImpairment_ON( impairment='ApplicationConnectivity', drop=100, filterNo=filterNo) api.waitSec(90) setStepStatus(api.TM.PASS) # ============ # STEP # ============ step_name = "Iteration: {} : Validate the current screen".format( iteration) expected_result = "Error code 0102 on the screen" defineStep(step_name, step_name, expected_result) if debugApk: api.writeDebugLine('Application connectivity check') adbLogs.printGenericLogs(t.server,
else: print("No need to reboot") setStepStatus(api.TM.PASS) # ============ # STEP # ============ step_name = "Iteration: {} : Initialise KMAX network emulator".format( iteration) expected_result = "Set up network impairment as per filter" defineStep(step_name, step_name, expected_result) kmaxImpairment.switchImpairment_ON(impairment='AndroidConnectivity', delay=5, filterNo=filterNo) api.waitSec(150) setStepStatus(api.TM.PASS) # ============ # STEP # ============ step_name = "Iteration: {} : Validate the current screen".format( iteration) expected_result = "Error code 102 on the screen" defineStep(step_name, step_name, expected_result) api.writeDebugLine("Android Connectivity check") adbLogs.printGenericLogs(t.server, t.slotNo, tag="chromium:E",
kmaxImpairment.switchImpairment_ON(impairment='CDN', delay=8, filterNo=filterNo) setStepStatus(api.TM.PASS) # ============ # STEP # ============ step_name = "Iteration: {} : Validate the current screen".format( iteration) expected_result = " Error code 0601 on the screen and the error message is Community-Version nicht erkannt" defineStep(step_name, step_name, expected_result) api.waitSec(120) if debugApk: api.writeDebugLine("CDN Software download connectivity") adbLogs.printGenericLogs(t.server, t.slotNo, tag="VeopApp:D", search="versionCheckFailureType") errorResult = errorCheck.getErrorCode() print(errorResult) if errorResult[0]: setStepStatus(api.TM.PASS) else: print('This is not an error screen/unknown error screen') api.captureImageEx(None, "currentScreen.png")[0][2].Close() setStepStatus(api.TM.FAIL)
api.powerOnSTB() else: print("No need to reboot") setStepStatus(api.TM.PASS) # ============ # STEP # ============ step_name = "Iteration: {} : Initialise KMAX network emulator".format( iteration) expected_result = "Set up network impairment as per filter" defineStep(step_name, step_name, expected_result) kmaxImpairment.switchImpairment_ON( impairment='ApplicationConnectivity', drop=100, filterNo=filterNo) api.waitSec(130) setStepStatus(api.TM.PASS) # ============ # STEP # ============ step_name = "Iteration: {} : Validate the current screen".format( iteration) expected_result = "Error code 0102 on the screen" defineStep(step_name, step_name, expected_result) if debugApk: api.writeDebugLine('Application connectivity check') adbLogs.printGenericLogs(t.server, t.slotNo,
print("No need to reboot") setStepStatus(api.TM.PASS) # ============ # STEP # ============ step_name = "Iteration: {} : Initialise KMAX network emulator".format( iteration) expected_result = "Set up network impairment as per filter" defineStep(step_name, step_name, expected_result) kmaxImpairment.switchImpairment_ON(impairment='DHCP', drop=0, delay=20, filterNo=filterNo) api.waitSec(105) setStepStatus(api.TM.PASS) # ============ # STEP # ============ step_name = "Iteration: {} : Validate the current screen".format( iteration) expected_result = "Error code 0100 on the screen " defineStep(step_name, step_name, expected_result) errorResult = errorCheck.getErrorCode() print(errorResult) if errorResult[0]: setStepStatus(api.TM.PASS)
setStepStatus(api.TM.PASS) # ============ # STEP # ============ step_name = "Iteration: {} : Initialise KMAX network emulator".format( iteration) expected_result = "Set up network impairment as per filter" defineStep(step_name, step_name, expected_result) kmaxImpairment.switchImpairment_ON(impairment='CSDS', drop=100, filterNo=filterNo) api.waitSec(150) setStepStatus(api.TM.PASS) # ============ # STEP # ============ step_name = "Iteration: {} : Validate the current screen".format( iteration) expected_result = "Error code 0204 on the screen" defineStep(step_name, step_name, expected_result) if debugApk: api.writeDebugLine("CSDS connectivity") adbLogs.printGenericLogs(t.server, t.slotNo,
kmaxImpairment.switchImpairment_ON(impairment='AndroidConnectivity', drop=100, filterNo=filterNo) setStepStatus(api.TM.PASS) # ============ # STEP # ============ step_name = "Iteration: {} : Validate the current screen".format( iteration) expected_result = "Error code 102 on the screen" defineStep(step_name, step_name, expected_result) api.waitSec(75) if debugApk: api.writeDebugLine('Android connectivity check') adbLogs.printGenericLogs(t.server, t.slotNo, tag='VeopApp:D', search='mNetworkStateListener') adbLogs.printGenericLogs(t.server, t.slotNo, tag='VeopApp:I', search='notifyNetworkStatusListeners') errorResult = errorCheck.getErrorCode() print(errorResult) if errorResult[0]: