muteria.configmanager.configurations module

This module implements the definition of the different configuration. NOTE: Make sure to run the function ‘save_common_default_template’

to save the default config after altering CompleteConfiguration. Write the default raw configuration template

>>> import muteria.configmanager.configurations as mcc
>>> mcc.save_common_default_template()
We have a class defined for each configuration type. namely:
  • ExecutionConfig: Execution Configuration.

  • ReportingConfig: Reporting Configuration.

  • ProjectConfig: Project Configuration.

  • TestcaseToolsConfig: Testcase Tools Configuration.

  • CodecoverageToolsConfig: Codecoverage Tools Configuration.

  • MutationToolsConfig: Mutation Tools Configuration.

TODO: Implement the restriction in adding extra element after creation TODO: Implement the verification of the parameters of each config TODO: Implement loading the values of the parameters from files… and

Checking

class muteria.configmanager.configurations.BaseToolConfig(tooltype=None, toolname=None, config_id=None, criteria_on=None, tool_user_custom=None)[source]

Bases: dict

Parameters:

criteria_on – (list) alternate way to represent criteria of a tool (TODO)

get_tool_config_alias()[source]
get_tool_criteria_on()[source]
get_tool_name()[source]
get_tool_type()[source]
get_tool_user_custom()[source]
class muteria.configmanager.configurations.CompleteConfiguration[source]

Bases: object

CODE_BUILDER_FUNCTION = None
CODE_BUILDER_MODULE = None
COVER_CRITERIA_ELEMENTS_ONCE = False
CRITERIA_ELEM_SELECTIONS = {}
CRITERIA_EXECUTION_OPTIMIZERS = {}
CRITERIA_REQUIRING_OUTDIFF_WITH_PROGRAM = None
CRITERIA_RESTRICTION_ENABLED = True
CRITERIA_SCORE_BY_TOOL = True
CRITERIA_SEQUENCE = None
CRITERIA_TESTGEN_GUIDANCE = {}
CRITERIA_TOOLS_CONFIGS_BY_CRITERIA = {}
CRITERIA_WITH_OUTPUT_SUMMARY = []
CUSTOM_DEV_TEST_PROGRAM_WRAPPER_CLASS = None
CUSTOM_DEV_TEST_RUNNER_FUNCTION = None
CUSTOM_DEV_TEST_RUNNER_MODULE = None
CUSTOM_TEST_EXECUTION_OUTPUT_CLEANER_FUNCTION = None
DETAILED_ELEMENTS_OUTPUT = False
DEVELOPER_TESTS_ENABLED = True
DEVELOPER_TESTS_LIST = None
DISCARD_FLAKY_TESTS = True
ENABLED_CRITERIA = []
EXECUTE_ONLY_CURENT_CHECKPOINT_META_TASK = False
EXECUTION_CLEANSTART = False
GENERATED_TESTS_ENABLED = True
GENERATE_HTML_REPORT = True
GET_PASSFAIL_OUTPUT_SUMMARY = True
HASH_OUTLOG = True
LOG_DEBUG = False
MAX_CRITERIA_ELEM_SELECTION_NUM_PERCENT = '100%'
ONLY_EXECUTE_SELECTED_CRITERIA_ELEM = True
OUTPUT_CRITERIA_COVERED_ELEMENTS = False
OUTPUT_CRITERIA_SCORES = True
OUTPUT_CRITERIA_SUBSUMING_ELEM_NUM = True
OUTPUT_CRITERIA_SUBSUMPTION_SCORE = True
OUTPUT_CRITERIA_UNCOVERED_ELEMENTS = True
OUTPUT_ROOT_DIR = None
OUTPUT_STATS_HISTORY = True
PROGRAMMING_LANGUAGE = None
REPORT_NUMBER_OF_DUPLICATED_TESTS = True
REPORT_NUMBER_OF_TESTS_GENERATED = True
REPOSITORY_ROOT_DIR = None
REPO_EXECUTABLE_RELATIVE_PATHS = None
RESTART_CURRENT_EXECUTING_META_TASKS = False
RE_EXECUTE_FROM_CHECKPOINT_META_TASKS = []
RUN_FAILING_TESTS_WITH_CRITERIA = []
RUN_MODE = None
RUN_PASSING_TESTS_WITH_CRITERIA = []
SINGLE_REPO_PARALLELISM = 1
STOP_TESTS_EXECUTION_ON_FAILURE = False
TARGET_CLASSES_NAMES = None
TARGET_METHODS_BY_TARGET_CLASSES = None
TARGET_SOURCE_INTERMEDIATE_CODE_MAP = None
TESTCASES_SELECTION = None
TESTCASE_TOOLALIASES_TO_SKIP_CRITERIA_COVERAGE = []
TESTCASE_TOOLS_CONFIGS = []
TEST_TOOL_TYPES_SCHEDULING = [(<TestToolType.USE_ONLY_CODE: 'StaticTestcaseTool'>,), (<TestToolType.USE_CODE_AND_TESTS: 'DynamicTestcaseTool'>,)]
class muteria.configmanager.configurations.ConfigClasses(value)[source]

Bases: EnumAutoName

An enumeration.

CONTROLLER_CONF = 'CONTROLLER_CONF'
CRITERIA_CONF = 'CRITERIA_CONF'
OTHER_CONF = 'OTHER_CONF'
PROJECT_CONF = 'PROJECT_CONF'
TESTCASES_CONF = 'TESTCASES_CONF'
class muteria.configmanager.configurations.ConfigElement(val=None, desc=None, val_range=None, conf_class=None)[source]

Bases: object

get_conf_class()[source]
get_desc()[source]
get_val()[source]
get_val_range()[source]
set_conf_class(new_conf_class)[source]
set_desc(new_desc)[source]
set_val(new_val)[source]
set_val_range(new_val_range)[source]
class muteria.configmanager.configurations.CriteriaToolsConfig(tooltype=None, toolname=None, config_id=None, criteria_on=None, tool_user_custom=None)[source]

Bases: BaseToolConfig

META_TEST_EXECUTION_EXTRA_TIMEOUT_TIMES = 100.0
SEPARATED_TEST_EXECUTION_EXTRA_TIMEOUT_TIMES = 1.5
set_meta_test_execution_extra_timeout_times(timeout_times)[source]
set_separated_test_execution_extra_timeout_times(timeout_times)[source]
class muteria.configmanager.configurations.SessionMode(value)[source]

Bases: EnumAutoName

An enumeration.

CUSTOM_EXECUTION_MODE = 4
EXECUTE_MODE = 0
INTERNAL_MODE = 2
RESTORE_REPOS_MODE = 3
VIEW_MODE = 1
class muteria.configmanager.configurations.TestcaseToolsConfig(tooltype=None, toolname=None, config_id=None, criteria_on=None, tool_user_custom=None)[source]

Bases: BaseToolConfig

COMPRESS_TEST_STORAGE_DIR = True
ONE_TEST_EXECUTION_TIMEOUT = 60.0
OUTLOG_MAX_ALLOWED_BYTES_SIZE = 8589934592
RECORDED_TEST_TIMEOUT_FACTOR = 5
TESTS_ORACLE_OTHER_EXECUTABLE = None
TESTS_ORACLE_OTHER_VERSION = None
TESTS_ORACLE_TESTS = True
TEST_EXECUTION_ERROR_AS_FAIL = False
TEST_GENERATION_MAXTIME = 7200.0
TEST_GEN_TIMEOUT_FRAMEWORK_GRACE = 100
set_compress_test_storage_dir(value)[source]
set_one_test_execution_timeout(timeout)[source]
set_outlog_max_allowed_bytes_size(value)[source]
set_recorded_test_timeout_factor(value)[source]
set_test_execution_error_as_failure(value)[source]
set_test_gen_maxtime(max_time)[source]
set_test_gen_timeout_framework_grace(grace_time)[source]
set_test_oracle_test(value)[source]
class muteria.configmanager.configurations.ToolUserCustom(**kwargs)[source]

Bases: dict

This config file is helpful to specify tool specific configurations For example: >>> conf = ToolUserCustom( PATH_TO_TOOL_EXECUTABLE=’/fullpath/to/tool/dir’, ENV_VARS_DICT={‘var1’: ‘value1’}, PRE_TARGET_CMD_ORDERED_FLAGS_LIST=[(‘-solver’, ‘stp’), (‘-mutation-scope’, os.path.abspath(“scopefile”))], POST_TARGET_CMD_ORDERED_FLAGS_LIST=[(‘-sym-args’, ‘0’, ‘2’, ‘3’)] )

Note: It is possibled to only specify a subset of the values.

DRIVER_CONFIG = None
ENV_VARS_DICT = None
PATH_TO_TOOL_BINARY_DIR = None
POST_TARGET_CMD_ORDERED_FLAGS_LIST = None
PRE_TARGET_CMD_ORDERED_FLAGS_LIST = None
muteria.configmanager.configurations.get_full_rawconf_template()[source]

Computes the defaul raw configuration template as string list

muteria.configmanager.configurations.save_common_default_template(filename=None)[source]

Write the default raw configuration template >>> import muteria.configmanager.configurations as mcc >>> mcc.save_common_default_template()