コード例 #1
0
def closeApp(device):
    StormTest.BeginLogRegion('Close App')
    StormTest.WaitSec(2)
    device.tap(mappedText='Home')

    result = colorMatch(color=(233, 235, 233),
                        tolerances=(16, 16, 16),
                        flatness=95,
                        peakError=15,
                        includedAreas=[940, 990, 10, 10],
                        timeToWait=60,
                        imageName='CloseApp',
                        comment='Match color on returning to home')
    if not result:
        device.tap(mappedText='Home')
        colorMatch(color=(233, 235, 233),
                   tolerances=(16, 16, 16),
                   flatness=95,
                   peakError=15,
                   includedAreas=[940, 990, 10, 10],
                   timeToWait=60,
                   imageName='CloseApp',
                   comment='Match color on returning to home')
    device.stop()
    StormTest.EndLogRegion('Close App')
    return result
コード例 #2
0
ファイル: connect_functions.py プロジェクト: k4ppa/Demo
def _getTestRunConfiguration():
    StormTest.BeginLogRegion('Open Connection')
    params = WarningCenter.GetTestRun()

    if params == None:
        return __getDeveloperModeParams()
    return params
コード例 #3
0
 def disconnect(self):
     StormTest.BeginLogRegion('Close Connection')
     self._connectionLog.info("Closing connection with the server\n")
     logging.shutdown()
     isClosed = StormTest.ReleaseServerConnection()
     StormTest.EndLogRegion('Close Connection')
     return isClosed
コード例 #4
0
ファイル: scenario.py プロジェクト: k4ppa/SkyOnlineDemo
def audioPresent(galaxyTab3, serviceInfo):
    StormTest.BeginLogRegion('audioPresent')
    video = _startTest('audioPresent')

    result, comment = _audioPresentTest()

    _endTest('audioPresent', serviceInfo, result, video, comment)
    StormTest.EndLogRegion('audioPresent')
    return result
コード例 #5
0
ファイル: scenario.py プロジェクト: k4ppa/SkyOnlineDemo
def videoPresent(galaxyTab3, serviceInfo):
    StormTest.BeginLogRegion('videoPresent')
    video = _startTest('videoPresent')

    result, comment, image = _videoPresentTest()

    _endTest('videoPresent', serviceInfo, result, video, comment, image)
    StormTest.EndLogRegion('videoPresent')
    return result
コード例 #6
0
    def connect(self, description=''):
        StormTest.BeginLogRegion('Open Connection')
        self._connectionLog.info(description)
        self._connectionLog.info("Started connection with the server")
        self._serviceInfo = _getTestRunConfiguration()['service']

        self._server, self._slot = _setUpEnvironment()
        self._connectionLog.debug("server:slot = {}:{}".format(
            self._server, self._slot))
        return _establishConnection(self._server, self._slot, description)
コード例 #7
0
def playVideo(device, serviceInfo):
    StormTest.BeginLogRegion('Play Video')
    if serviceInfo['name'] == 'Sky TG24':
        isPlayed = _playSkyTG24(device)
        StormTest.EndLogRegion('Play Video')
        return isPlayed

    videoName = _pickRandomVideo(device)
    isPlayed = False
    if _findVideo(device, videoName):
        isPlayed = _startVideo(device)

    StormTest.EndLogRegion('Play Video')
    return isPlayed
コード例 #8
0
ファイル: scenario.py プロジェクト: k4ppa/SkyOnlineDemo
def catalogAvailability(galaxyTab3, serviceInfo):
    if _connectionError(galaxyTab3):
        log.error("App connection error: test aborted")
        return False

    StormTest.BeginLogRegion('catalogBrowsing')
    video = _startTest('catalogBrowsing')

    catalogName = serviceInfo['name']
    result, comment, image = goToCatalog(galaxyTab3, catalogName)

    _endTest('catalogBrowsing', serviceInfo, result, video, comment, image)
    StormTest.EndLogRegion('catalogBrowsing')
    return result
コード例 #9
0
def stopVideo(device):
    StormTest.BeginLogRegion('Stop Video')
    device.tap(mappedText='closeVideo')
    device.tap(mappedText='closeVideo')
    device.tap(text='No')

    result = colorMatch(color=(50, 114, 167),
                        tolerances=(16, 16, 16),
                        flatness=90,
                        peakError=80,
                        includedAreas=[430, 80, 10, 10],
                        timeToWait=60,
                        imageName='StopVideo',
                        comment='Match color on closing the video')
    StormTest.EndLogRegion('Stop Video')
    checkCrash(device)
    return result