How to achieve test automation using a test harness in Simulink Test?

조회 수: 3 (최근 30일)
Flavius
Flavius 2016년 11월 22일
댓글: Purusottam bhatia 2020년 9월 13일
I am a novice in Simulink, and I am trying to test a subsystem of a Simulink model using a test harness. I have created a test harness in which I manipulate manually the inputs of the component under test, then I observe and record manually the outputs in an Excel spreadsheet. The inputs are basically constant blocks, while the outputs are display blocks. Given some inputs, if the outputs are those expected, then the test has passed.
My question is how can I automate this manual testing?
I gather from the Simulink Test documentation that the Test Manager allows test automation. I see that a baseline/simulation test allows parameter overrides, which can be used in iterations. However, I wasn't able to figure out how to automate the use my of test harness.

답변 (1개)

Jon Lobo
Jon Lobo 2016년 12월 6일
In the test manager, you will create a test case. Generally speaking, a test case is created to test a specific functionality. The simulink model may have several desired functionalities / requirements, and therefore you may have several test cases eventually.
To do automated testing of parameter sweeps or maybe run through a set of pre-defined parameters, you can use the iterations approach (scripted or manual). This you would set up in the test manager. From the test manager you can click run all to run all iterations of the test, which will pass/fail the different iterations based on the criteria you provided.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by