When re-analyze or run the tests after modifying source codes, CT detects modifications with integrity checker. CT divide source code modification with four cases.
- Modifying names of test or stub functions.
- Modifying names of global variables used in tests.
- Modifying name or number of return type or parameter of test functions.
- Modifying the code of the target function to be injected with the fault.
Modifying names of test or stub functions
When modifying names of test or stub functions, the Function Reconfiguration dialog shows up.
- Left area is a list of function that modification detected. Functions that finish reconfiguration are marked with
.
- Left area is a list of function contained in present source code.
- It’s sorted by similarity of function name.
- Function with high similarity is connected automatically.
- It allow to search a function name. ( *: any string, ?: any letter )
- It show or hide functions with tests.
Modifying names of global variables used in tests
When modifying names of global variables used in tests, the Global Variable Reconfiguration dialog shows up.
- Left area is a list of global variables that cannot find.
- Uncheck check boxes when variables are deleted.
- Right area contain text boxes for entering present global variable.
- When user modify a global variable name, it shows global variable list in order of similarity.
- When user enter a valid variable, red mark in the text box disappear.
Modifying name or number of return type or parameter of test functions
When modifying name or number of return type or parameter of test functions, the Test Reconfiguration dialog shows up.
- A list of modified functions.
- Test information about function before modifying.
- If a variable connect to test information after modifying, it’s displayed in green and if not, it’s displayed in red.
- Test information about function after modifying.
Modifying the code of the target function to be injected with the fault
If the code of the fault injection function has changed, the Reconfiguring Fault Injection dialog appears.
The list of fault injection functions is displayed in area 1, pre-change fault injection information is displayed in area 2, and after-change fault injection information is displayed in area 3.
- The list of fault injection functions
- If the checkbox is unchecked, the previous fault injection information is retained without saving changes.
- The Fault Injection Information window
- Pre-change fault injection information can only be copied. You can copy by shortcut(
Ctrl
+C
) or right-click. - After-change, the fault injection information can be modified. You can copy/paste by shortcut (
Ctrl
+C
/V
) or right-click. - Changed lines are marked with a line number in red.
- Double-clicking on a line selects the same line as the one selected in the other Fault Injection Information window.
- The code written on the selected line can be shown in the Fault Injection Code window at the bottom.
- Pre-change fault injection information can only be copied. You can copy by shortcut(
- The Fault Injection code window
- The code written before and after the selected line is displayed.
- Locations where fault injection is not allowed are disabled so that you cannot write code.
Need more help with this?
Don’t hesitate to contact us here.