The verify statement criteria/ error message is not appearing in simulink test report.
7 ビュー (過去 30 日間)
古いコメントを表示
Hi,
I am using simulink test to test my model. I am using simulink test sequency block and adding verify() to assess criteria. I want verify statement and actual result to appear in simulink test report using simulink test manager. I am using label inside verify() so that simulink test manager captures that. Label is appearing . But assessment criteria and actual result is not appearing in test report. how it is possible to add verify criteria and actual result value in the test report. for example:
verify(x==y,'SimulinkTest:X_equal_Y','actual result = %d, %d'x,y);
and then what appears in the report is below image which does not tell much about the test.
what I want to appear is below text:
x==y , SimulinkTest:X_equal_Y , Actual result= 3,5
no verify statement nor the error message appear in the report. It is really frustating that it does not appear in the report.
Thanks,
Somdut
0 件のコメント
回答 (1 件)
Avinash Mangena
2020 年 11 月 5 日
According to the syntax of
verify(expression,errorMessage) returns the specified error message string for the failed verify statement. If you run the test in the Test Manager, the error message appears in the simulation log. If you run the test outside the Test Manager, the message appears in the Diagnostic Viewer.
verify(expression,identifier,errorMessage) uses the identifier as a label for the test results. The identifier is used as the signal label in the Test Manager. If you run the test outside the Test Manager, the label appears in the Simulation Data Inspector or, for a failure, in the Diagnostic Viewer. The identifier is a string that has at least two colon-separated MATLAB® identifiers.
So only identifier will be appeared in the log result for the fail message.
If you want to appear as below test in log
x==y , SimulinkTest:X_equal_Y , Actual result= 3,5.
You need to use
verify(x==y,'actual result = %d, %d'x,y);
1 件のコメント
参考
カテゴリ
Help Center および File Exchange で Inputs についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!