def __init__(self): """ 初始化测试信息 """ tool = Utl() self.test_cases = tool.get_concrete_test_case() self.test_case_2_MRs = tool.get_test_case_2_MRs()
def __init__(self): # 创建工具类 tool = Utl() self.__exec_utl = execute_utl() # 获取测试用例的具体信息,索引是行号,从1考试 self.__test_cases = tool.get_concrete_test_case() # 获取测试用例与蜕变关系之间的关系,键是测试用例的编号,值是可以作用的蜕变关系列表 self.__test_case_2_MRs = tool.get_test_case_2_MRs() # 获取分区与测试用例的编号,键是分区编号(1-550),值是该分区的测试用例 self.__partition_map = allocation_object.get_partition_map() # 获取执行错误的测试用例的编号 self.__wrong_test_cases = self.__exec_utl.get_wrong_patterns() # 初始化测试信息记录对象 self.__F_time_recorder = Ftime() self.__F2_time_recorder = F2time() self.__F_measure_recorder = F() self.__F2_measure_recorder = F2() # 获取分区与测试用例之间的关系 self.__partition_map = allocation_object.get_partition_map() # 初始化控制测试执行的策略 self.__mapt = mapt()
def __init__(self): """ 初始化测试信息 """ tool = Utl() self.test_cases = tool.get_concrete_test_case() self.test_case_2_MRs = tool.get_test_case_2_MRs() self.wrong_test_cases = self.exec_utl.get_wrong_patterns()
# @Anthor : phantomDai """ executing each partition and calcuting partition failure rate and mutants failure rate """ from execute.utl.Utl import execute_utl from constant import constantNumber as constant from partition import allocation_testcases_4_partitions as allocation_object from myutl.Utl import Utl import linecache import os import time partition_map = allocation_object.get_partition_map() tool = Utl() test_cases = tool.get_concrete_test_case() exec_utl = execute_utl() content = [] wrong_test_cases = exec_utl.get_wrong_patterns() def execute(partition_index): partition_info = "partition: " + str(partition_index) + ";" # add a list temp_list = [] partition_test_cases = partition_map[partition_index] partition_info += "number of test cases: " + str( len(partition_test_cases)) + ';'