필터 지우기
필터 지우기

Can you not create Test harnesses for Subsystems in Subsystem Reference models?

조회 수: 15 (최근 30일)
Hi, I have been trying to create some unittests for some subsystems I have, but have run into the problem of not being able to create Test Harnesses while i was inside a Subsystem Reference model (either through another model og on its own). It seems the only option i have for Test Harnesses in Subsystem Reference models is on the very top layer (for the subsystem reference block itself) I cant figure out if i'm missing something obvious or if it is impossible fore some reason ? I have tried to describe the steps I have taken to try and get a Test harness to work for a Subsystem block inside a Subsystem Reference model below. A Subsystem inside a Subsystem Reference model does not display the 'Test harness' context menu option when you right-click on the Subsystem block, but Right-clicking the Canvas anywhere in the Subsystem Reference will give you the option. On the top layer of the Subsystem Reference model, you can successfully create a Test Harness this way, but trying to 'Cheat' and create a Test Harness this way for a Subsystem inside the Subsystem Reference model, will result in an error. With Diagnostic Viewer returning: (This Diagnostic Viewer error message is from an attempt where the Subsystem Reference model was opened on its own. The error is slightly different if attempted from a model where the Subsystem Reference model is referenced. Then the message changes from blaming 'Subsystem' to 'Subsystem Reference') Best Regards, Michael

채택된 답변

Divyank
Divyank 2022년 9월 13일
Currently, the test harnesses are not supported for the contents of Subsystem Reference block. You can try to create a library link using Simulink libraries for which test harnesses can be created and will be stable.
  댓글 수: 3
Pat Canny
Pat Canny 2022년 9월 13일
편집: Pat Canny 2022년 9월 13일
Hi @Michael Buhl - thanks for your question.
(Edited reply)
Are you planning on testing generated code?
Michael Buhl
Michael Buhl 2022년 9월 15일
Hi, yes I do want to run some integration tests and such on the generated code (both in isolation, but also integrated into a bigget system).

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Subsystems에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by