Is it possible to generate MCDC coverage testcases from a boolean Matlab function?
Mostra commenti meno recenti
As it is possible to generate MCDC coverage testcases for Simulink models using Design Verifier, would it be possible to generate testcases on a boolean Matlab function, for example:
A = B & C
I am interested in this case in obtaining a testcase with 3 test steps:
B C A
1 1 1
1 0 0
0 1 0
3 Commenti
Pat Canny
il 7 Mar 2019
Hi George,
Sorry for the delay.
Are you asking how to generate tests with Design Verifier on a MATLAB function with the described logic?
Hisham
il 21 Giu 2024
Hi Pat
I'm interested to know if design verifier (or any other Mathworks plug-in) can generate mcdc testcases based on any given boolean expression?
Thanks in advance, Hisham
MULI
il 23 Ago 2024
Hi George,
Simulink design verifier can be with simulink models. So if you are interested to generate MCDC for boolean expression you can do it in simulink as given below.
TESTGENERATION SETTINGS > MODEL COVERAGE OBJECTIVES>MCDC
INPORTS AND OUTPORTS : DATA_TYPE: Boolean

Risposte (1)
Ayush Modi
il 26 Ago 2024
0 voti
Hi George,
I understand you want to write a boolean MATLAB function and do a MC/DC analysis for that function. You can use Simulink design verifier for this. Two ways to approach this are as follows:
1- Save the boolean function in a ".M" file. Then, in the Configuration Parameters dialog box, on the Coverage pane, select Coverage for MATLAB files. After simulation, the model coverage report summary contains sections for the top-level model and for the external function.
2- Other way is to create MATLAB function block which contains the boolean function. Then in the Configuration Parameters dialog box, on the Coverage pane, under Other metrics, select Objectives and Constraints.
Refer to the following MathWorks documentation for more information on coverage reports for MATLAB functions:
Categorie
Scopri di più su Collect Coverage for Models in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!