The Fault Injection View provides the feature for inserting the code needed to test additionally into the specific area of the function to be tested.
- Drag and drop the function that you want to inject a fault from the Test Navigator View or the Unit Test View to the Fault Injection View.
- In the tree structure on the left of the view, click the line that you want to inject a fault and, on the right of the view, enter the user code to insert before/after the line. The number of the line where user code is written is underlined.
Toolbar menu in the Fault Injection view
Context menu in the Fault Injection view
Function nodes and lines can be multi-selected to bring up the context menu.
Context menu of function nodes
Menu | Description |
---|---|
|
Remove the function inserted by users. |
Context menu of lines
Pull-down menu
Menu | Description |
---|---|
|
Note the Reconfiguring Fault Injection |
Export Fault Injections
- In the directory dialog, specify the save location for the fault injection file (.xls) and then select the [Save] button.
Import Fault Injections
- If the source code of the fault injection information you want to import is different from the source code of the CT 2023 project, fault injection can be reused to match the changed source code using [Reconfiguration the fault injection to import] feature.
- If the source code shape is different when performing defect injection import, the following dialog will appear.
- You can reconfigure the import of fault injection by clicking the [OK] button.
- On the left, the source code of the fault injection information you want to import is displayed.
- On the right, the source code of the current project is displayed.
- If you click the [OK] button in the [Reconfiguration the Fault Injections to Import] window, you can import the reconfigured fault injection information.
- If the source code shape is different when performing defect injection import, the following dialog will appear.
- If you have fault injections already created in the same location as the fault injection information you want to import into your project, you need to decide whether to overwrite the fault injection.
- When importing fault injection, if there is fault injection information in the existing location, the following dialog will appear.
- The [Fault Injection Overwrite Warning] dialog shows the function, line, and location of the fault injection that does not match the existing information.
- If you select [Overwrite], the existing fault injection information will be overwritten with the fault injection information you want to import.
- If [Import excluding conflict functions] is selected, only fault injection information for functions except for conflict functions is imported.
- Clicking the [Cancel] button cancels the import of fault injections.
- When importing fault injection, if there is fault injection information in the existing location, the following dialog will appear.
Need more help with this?
Don’t hesitate to contact us here.