Exemplo n.º 1
0
def main():
    """
    分别查找待执行的测试用例集, 和测试用例列表,并执行。
    :return:
    """

    idList = test_task_manage.test_task_manage().test_suite_list()
    if len(idList):
        for caselist in idList:
            test_suite_id = caselist[0]
            runType = str(caselist[1])
            if  runType =='2' or runType =='Chrome':
                threadNum = 6
                runType = 'Chrome'
                process.process().runmain(test_suite_id, threadNum, runType)
        result1 = 0
    else:
        result1=1
    idList1 = test_task_manage.test_task_manage().test_case_list()
    if len(idList1):
        threadNum = 6
        process.process().multipleRun(idList1, threadNum)
        result2 = 0
    else:
        result2=1
    result = result1 +result2
    return result
Exemplo n.º 2
0
def main():

    idList = test_task_manage.test_task_manage().test_suite_list()
    idList1 = test_task_manage.test_task_manage().test_case_list()
    if len(idList):
        for caselist in idList:
            test_suite_id = caselist[0]
            runType = str(caselist[1])
            if runType =='0' or runType =='Android':
                threadNum = 1
                runType ='Android'
            elif runType =='1' or runType =='iOS':
                threadNum = 1
                runType ='iOS'
            elif  runType =='2' or runType =='Chrome':
                threadNum = 6
                runType = 'Chrome'
            else:
                threadNum = 0
                runType = ''
            process.process().runmain(test_suite_id, threadNum, runType)
        result1 = 0
    else:
        result1=1
    if len(idList1):
        threadNum = 1
        process.process().multipleRun(idList1, threadNum)
        result2 = 0
    else:
        result2=1
    result = result1 +result2
    return result
Exemplo n.º 3
0
 def runmain(self, test_suite_id, threadNum, runType):
     Hubs = hubs.hubs().showHubs(runType)
     if len(Hubs) == 0:
         log.log().logger.error('cannot run for no available hubs!')
     else:
         self.multipleRun(util.util().getTeseCases(test_suite_id),
                          threadNum)
         test_task_manage.test_task_manage().update_test_suite_check()
Exemplo n.º 4
0
 def runmain(self,test_suite_id,threadNum, runType ):
     if runType == 'Android' and isUseATX:
         Hubs = hubs.hubs().getDevices()
         log.log().logger.debug('Run type is ATX and usable devices are %s' %Hubs)
     else:
         Hubs = hubs.hubs().showHubs(runType)
     if len(Hubs) ==0:
         log.log().logger.debug('cannot run for no available hubs!')
     elif runType == 'Android' and isUseATX:
         self.atxMain()
     else:
         self.multipleRun(util.util().getTeseCases(test_suite_id),threadNum)
         test_task_manage.test_task_manage().update_test_suite_check()
Exemplo n.º 5
0
def main():
    """
    查找待执行的测试用例列表,并执行。
    :return:
    """
    idList1 = test_task_manage.test_task_manage().test_case_list(isATX=True)
    if len(idList1):
        process.process().atxMain()
        result2 = 0
    else:
        result2 = 1
    result = result2
    return result
Exemplo n.º 6
0
def main():
    test_task_manage.test_task_manage().update_test_suite_check()
    idList = test_task_manage.test_task_manage().test_suite_list()
    idList1 = test_task_manage.test_task_manage().test_case_list()
    # log.log().logger.info(idList)
    result1 = 0
    result2 = 0
    if len(idList):
        for caselist in idList:
            test_suite_id = caselist[0]
            runType = str(caselist[1])
            if runType == '0' or runType == 'Android':
                threadNum = 1
                runType = 'Android'
            elif runType == '2' or runType == 'Chrome':
                threadNum = 6
                runType = 'Chrome'
            else:
                threadNum = 0
                runType = ''
            if runType == '':
                test_task_manage.test_task_manage().update_test_suite(
                    test_suite_id, '3')
            else:
                test_task_manage.test_task_manage().update_test_suite(
                    test_suite_id, '2')
                process.process().runmain(test_suite_id, threadNum, runType)
        result1 = 0
    else:
        result1 = 1
    if len(idList1):
        threadNum = 1
        process.process().multipleRun(idList1, threadNum)
        result2 = 0
    else:
        result2 = 1
    result = result1 + result2
    return result
Exemplo n.º 7
0
 def runmain(self, test_suite_id, threadNum, runType):
     Hubs = hubs.hubs().showHubs(runType)
     self.multipleRun(util.util().getTeseCases(test_suite_id), threadNum)
     test_task_manage.test_task_manage().update_test_suite_check()