Test Cases using Signalbuilder - Run one after the other then get result

1 次查看(过去 30 天)
Hi,
I am trying to run test cases to test my stateflow. I have 5 signals and have managed to construct a signalbuilder block with 5 signals and 80 groups (group is each test case). I imported a .MAT file to make the 5 signals 80 groups within signalbuilder.
I have connected this directly to the relevant inputs in the stateflow. I would like to run each test case (group) one after the other and then compile this data into a report or even an excel file of some sort?
At the moment, I have pressed the start simulation button in the signalbuilder screen which correctly plays one group of signals. When pressing run all it runs all but produces a coverage report that is of no value.
Is there a more efficient way of doing this?
Please can you help regarding these issues.
Thanks very much.
R.

回答(1 个)

Young Ma
Young Ma 2017-10-13
编辑:Young Ma 2017-10-13
Hi Raju,
I understand from your question that your system under test is a Stateflow chart and you want to use Signal Builder block as your source to test different scenarios (groups in the Signal Builder) and generate coverage results for each group for reporting.
If you are using Simulink Test in MATLAB version R2016a or later, you can refer to the following example to create a test file to sweep over your Signal Builder groups:
Once you create your test file, you can enable coverage options in the test file. Here is an example to help you with this:
From the test result, you can generate a report that includes the coverage results. Here is an example for creating the report from results:

类别

Help CenterFile Exchange 中查找有关 Outputs 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by