muteria.drivers.testgeneration.base_testcasetool module

Testcase tool module. The class of interest is BaseTestcaseTool. The class represent a testcase tool which manages a working directory where, given code files(executable) represented in the repository dir, corresponding tests are generated (harvested) by code files. Those test can also be executed using the same code used to generate the tests or other code specified.

The tools are organized by programming language

For each language, there is a folder for each tool, named after the tool in all lowercase , starting with letter or underscore(_), The remaining caracters are either letter, number or underscore

XXX Each testcase tool package must make each test case tool visible in the __init__.py file (Just set to None if not defined). For Example: - If nothing is defined: >>> StaticTestcaseTool = None >>> StaticMutantTestcaseTool = None >>> DynamicTestcaseTool = None >>> DynamicMutantTestcaseTool = None

  • If for example the StaticTestcaseTool is defined as the class

<class extending BaseTestcaseTool>, in th module <Module>, replace

“StaticTestcaseTool = None” with:

>>> import <Module>.<class extending BaseTestcaseTool> as StaticTestcaseTool
class muteria.drivers.testgeneration.base_testcasetool.BaseTestcaseTool(tests_working_dir, code_builds_factory, config, head_explorer, checkpointer, parent_meta_tool=None)[source]

Bases: ABC

class RepoRuntestsCallbackObject(op_retval=None, pre_callback_args=None, post_callback_args=None, repository_rootdir=None, repo_executables_relpaths=None, source_files_to_objects=None, dev_tests_list=None)[source]

Bases: DefaultCallbackObject

after_command()[source]

Return True for success

can_run_tests_in_parallel()[source]
clear_working_dir()[source]
execute_testcase(testcase, exe_path_map, env_vars, timeout=None, use_recorded_timeout_times=None, recalculate_execution_times=False, with_output_summary=True, hash_outlog=True)[source]
generate_tests(exe_path_map, meta_criteria_tool_obj=None, parallel_count=1, code_builds_factory_override=None, max_time=None)[source]
get_checkpointer()[source]
get_test_format_class()[source]

Can be useful for test fdupes

abstract get_testcase_info_object()[source]
get_toolalias()[source]
get_toolname()[source]
has_checkpointer()[source]
abstract classmethod installed(custom_binary_dir=None)[source]

A decorator indicating abstract classmethods.

Deprecated, use ‘classmethod’ with ‘abstractmethod’ instead.

requires_criteria_instrumented()[source]
runtests(testcases, exe_path_map, env_vars, stop_on_failure=False, per_test_timeout=None, use_recorded_timeout_times=None, recalculate_execution_times=False, with_output_summary=True, hash_outlog=True, parallel_count=1)[source]
tool_installed()[source]

Check that a tool with given conf is installed