mutate: list all tests that kill mutants in a specific C/C++ functionΒ #1133
Open
Description
The user wants to know which tests are being used to verify a specific C/C++ function in the software under test.
Assume:
- There is a function foo() where there are a lot of surviving mutants and some killed mutants.
- The user has been tasked with investigating if new requiremnets, new tests or fixing a test is needed.
- There is a "dedicated test" that kills only 1 mutant in foo() that needs to be improved.
- The user does not yet know about the "dedicated test".
- There are serveral tests (for example integration tests) that kill other mutants in the function.
Current Approach:
- The user scrolls through the function and inspects all killed mutants one at a time.
Problems:
- It takes time to get a complete list of the test candidates.
- It is easy to miss the dedicated test -> Instead of fixing the dedicated test, the user might write a redundant test -> Increased maintenance costs.
Suggestions
Approach 1: Improve the HTML report
Approach 1.1: Using the "code view"
Generate a C/C++ function summary (similar to the killed by test list), that can be expanded for the function of interrest.
Approach 1.2: Using a new C/C++ function view
Generate a new page with a large table where files, C/C++ functions are and mapped test cases are listed.
Approach 2: Command-line interface
The user specifies the name of a C/C++ function in the SUT and retrieves a list of all tests that kill mutants in that function.