defineStep(step_name, step_name, expected_result)
        if reboot:
            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')
            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='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]:
            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='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")
        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',
                                           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)
            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='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,
Example #6
0
        if motion_result[0]:
            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')
Example #7
0
        if motion_result[0]:
            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='CDN',
                                           delay=8,
                                           filterNo=filterNo)

        api.waitSec(100)
        setStepStatus(api.TM.PASS)

        # ============
        # STEP
        # ============

        step_name = "Iteration: {} : Validate the current screen".format(
            iteration)
        expected_result = "Error code 11630 on the screen"
        defineStep(step_name, step_name, expected_result)

        if debugApk:
Example #8
0
            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='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)